LabVIEW 2012 Control Design and Simulation Module Help
»View Product Info
Representing damping and stiffness involves feeding back the velocity and position, each multiplied by a different constant, to the input of the Calculate Acceleration function. Recall the following differential equation this VI simulates.
F(t) – cx'(t) – kx(t) = mx''(t)
In the previous equation, notice you multiply the damping constant c by the velocity of the mass x'(t). You multiply the stiffness constant k by the mass position x(t). You then subtract these quantities from the external force applied to the mass.
Complete the following steps to represent damping and stiffness in this dynamic system model.
- View the simulation diagram.
- Select the Signal Arithmetic palette and place a Summation function on the simulation diagram. Move this function to the left of the Force and Mass controls.
- Double-click the Summation function to configure its operation. By default, the Summation function displays the following three input terminals: a Ø symbol, a + symbol, and a – symbol. This configuration subtracts one input signal from another.
||Note The Ø terminal configures the visual layout of the function and does not provide a terminal for an input signal.
- Click the Ø symbol twice to change this terminal to the – symbol. This Summation function now subtracts the top and bottom input signals from the left input signal.
- Click the OK button to save changes and return to the simulation diagram.
- Select the Signal Arithmetic palette and place a Gain function on the simulation diagram. Move this function above the existing simulation diagram code but still within the Control & Simulation Loop.
- The input of the Gain function is on the left side of the function, and the output is on the right side. You can reverse the direction of these terminals to indicate feedback better. Right-click the Gain function and select Reverse Terminals from the shortcut menu. The Gain function now points toward the left side of the simulation diagram.
- Label this Gain function Damping.
- Press the <Ctrl> key and drag the Gain function to create a separate copy. Move this copy below the existing simulation diagram code but still within the Control & Simulation Loop. Label this function Stiffness.
- Right-click the wire connecting the Force control to the Calculate Acceleration function and select Delete Wire Branch from the shortcut menu. Move the Force control to the left of the Summation function, and wire this control to the Operand2 input of the Summation function.
- Create wires 1–5 as indicated in the following image.
The simulation diagram now fully represents the equation that defines the behavior of the dynamic system.
- Press <Ctrl-S> to save the VI.