Slope2Deviation

Computes the square of the deviation of the slope of a curve at a certain point in time from a target value. A finite differencing scheme is used to compute the slope.

Example

In suspension design, it is common to have targets for ride-steer, ride-camber and ride-caster at design, full jounce and full rebound. The design engineer is tasked with meeting these targets.

For those not familiar with suspension terminology: design, jounce and rebound are three different configurations for the suspension. Steer, camber and caster are thee angular measures that are of interest to suspension designers. Ride-steer, ride-camber and ride-caster are the slopes of the steer vs. ride height, camber vs. ride height and caster vs. ride height curves. Ride height is defined as the height of the wheel center above the road.

In the physical test, the front suspension is mounted on two jacks. Design position corresponds to zero displacement in the jacks. As the jacks move up and down due to a sinusoidal input, the suspension moves from design position to jounce, back to design and then rebound...and so on.

In this example, we will compute the square of the deviation of ride-camber at full jounce position (T=2.4 seconds).

Here is a code fragment that would perform this calculation. A unit conversion factor of 0.001 is used in the ride height calculations to convert from mm to m.
>>> # Ride Height @ Full Jounce: point 1
>>> x1  = ValueAtTime (label         = "Ride Height @ Full Jounce",
                       measuredValue =  "0.001*DZ(30701024,30701025,10701021)",
                       atTime        = 2.30,
                       delta         = 0.1,
                      )

>>> # Camber @ Full Jounce: point 1
>>> y1  = ValueAtTime (label           = "Camber @ @ Full Jounce",
                       measuredValue   =  "-ROLL(30701024,30701025)*RTOD",
                       atTime          = 2.30,
                       delta           = 0.1,
                      )

>>> # Ride Height @ Full Jounce: point 2
>>> x2  = ValueAtTime (label           = "Ride Height @ Full Jounce ",
                       measuredValue   =  "0.001*DZ(30701024,30701025,10701021)",
                       atTime          = 2.50,
                       delta           = 0.1,
                      )

>>> # Camber @ Full Jounce: point 2
>>> y2  = ValueAtTime (label           = "Camber @ Full Jounce ",
                       measuredValue   = "-ROLL(30701024,30701025)*RTOD",
                       atTime          = 2.50,
                       delta           = 0.1,
                      )

>>> # Camber @ Full Jounce – y1
>>> sd  = Slope2Deviation (label       = "(1/2)*(1-RideCamber@FullJounce/5)**2",
                           points      = (y2,x2,y1,x1),
                           targetValue = +5,
                          )

The calculation in Slope2Deviation for this example is implemented as:

f = slope2  ( y2, x2, y1, x1 ) if  | targetValue |  >  :  Slope2Deviation= ( 1 2 ) (1 -  f t arg e t v a l u e ) 2 else:   Slope2Deviation= ( 1 2 ) ( f – targetValue ) 2 MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaebbnrfifHhDYfgasaacH8srps0l bbf9q8WrFfeuY=Hhbbf9v8qiqrFr0xc9pk0xbba9q8WqFfea0=yr0R Yxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeaabeqadiWa ceGabeqabeqadeqadeaakqaabeqaaabbaaaaaG+acXwDLbWdbiaabA gacaqGGaGaaeypaiaabccacaqGZbGaaeiBaiaab+gacaqGWbGaaeyz aiaabkdacaqGGaWaaeWaaeaacaqG5bGaaeOmaiaabYcacaqGGaGaae iEaiaabkdacaqGSaGaaeiiaiaabMhacaqGXaGaaeilaiaabccacaqG 4bGaaeymaaGaayjkaiaawMcaaaqaaiaabMgacaqGMbGaaeiiamaaem aabaGaaeiDaiaabggacaqGYbGaae4zaiaabwgacaqG0bGaaeOvaiaa bggacaqGSbGaaeyDaiaabwgaaiaawEa7caGLiWoacaqGGaGaaeOpai aabccacqGHiiIZcaGG6aGaaeiOaiaabofacaqGSbGaae4Baiaabcha caqGLbGaaeOmaiaabseacaqGLbGaaeODaiaabMgacaqGHbGaaeiDai aabMgacaqGVbGaaeOBaiaab2dacaqGGaGaaeikamaalaaabaGaaGym aaqaaiaaikdaaaGaaeykaiaabccacaqGOaGaaeymaiaabccacaqGTa GaaeiiamaalaaabaGaamOzaaqaaiaadshaciGGHbGaaiOCaiaacEga caWGLbGaamiDaiaadAhacaWGHbGaamiBaiaadwhacaWGLbaaaiaabM cadaahaaWcbeqaaiaabkdaaaaak8aabaWdbiaabwgacaqGSbGaae4C aiaabwgacaqG6aGaaeiOaiaabckacaqGGcGaae4uaiaabYgacaqGVb GaaeiCaiaabwgacaqGYaGaaeiraiaabwgacaqG2bGaaeyAaiaabgga caqG0bGaaeyAaiaab+gacaqGUbGaaeypaiaabccacaqGOaWaaSaaae aacaaIXaaabaGaaGOmaaaacaqGPaWaaeWaaeaacaqGMbGaaeiiaiaa bobicaqGGaGaaeiDaiaabggacaqGYbGaae4zaiaabwgacaqG0bGaae OvaiaabggacaqGSbGaaeyDaiaabwgaaiaawIcacaGLPaaadaahaaWc beqaaiaabkdaaaaaaaa@AAD7@