ResponseExpression

Computes the value of a user specified function.

Function parameters could be a MotionSolve expression, a Dv or a Response of any kind.

Example

Assume that you are designing a PID controller and the physical limit of the system impose a constraint on the gain:(1)
k p 2   +   k d 2  +  k i 2    1 MathType@MTEF@5@5@+= feaagKart1ev2aqatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9 vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaaeeaaaaaa6di eB1vgapeGaam4AamaaDaaaleaacaWGWbaabaGaaGOmaaaakiaabcca cqGHRaWkcaqGGaGaam4AamaaDaaaleaacaWGKbaabaGaaGOmaaaaki aabccacaqGRaGaaeiiaiaadUgadaqhaaWcbaGaamyAaaqaaiaaikda aaGccaqGGaGaeyizImQaaeiiaiaabgdaaaa@48CE@
Here is a code snippet that shows how this is done with ResponseExpression:

>>> # Define Dvs
>>> kp = Dv(b = 0.5, blimit = [0,1])
>>> ki = Dv(b = 0.5, blimit = [0,1])
>>> kd = Dv(b = 0.5, blimit = [0,1])
>>>
>>> # Define the function expression
>>> sum_square = "k1**2 + k2**2 + k3**2" 
>>>
>>> # Define the ResponseExpression
>>> response    = ResponseExpression (
      label     = "Sum of square", 
      function  = sum_square, 
      symbols   = ["k1", "k2", "k3"],
      variables = [kp, ki, kd],
    )