Page 121 - Mechatronic Systems Modelling and Simulation with HDLs
P. 121
110 6 MECHANICS IN HARDWARE DESCRIPTION LANGUAGES
Now to spring and damper models. For the spring model the applied force is
dependent upon the position, i.e. upon the distortion of the spring. The damping
force, on the other hand, is proportional to the relative velocity of the two termi-
nals of the damper model, and thus primarily describes the Stokes’ friction of a
viscous fluid, such as for example in an automotive shock absorber. The following
equations form the basis:
F spring =−k(x p − x n − l 0 )
F damper =−b(v p − v n ) (6.31)
The appropriate conversion is found in Hardware descriptions 6.2 and 6.3.
LIBRARY disciplines; -- Reference to a package with the
USE disciplines.Kinematic_system.all;-- mechanics declarations
ENTITY spring_trans IS -- Interface description
GENERIC (k, l0: REAL);-- Spring constant, basic spring length
PORT (TERMINAL p, n: kinematic); -- Terminals
end spring_trans;
ARCHITECTURE simple OF spring_trans IS -- Architecture
-- Declaration of potential/flow = deflection/force ...
QUANTITY tdisp ACROSS tforce THROUGH p TO n;
BEGIN
tforce == -k * (tdisp - l0); -- Basic equation
END simple;
Hardware description 6.2 Spring model for translational movements
In both cases the spring or the damping force is first calculated and correspond-
ingly applied. This force is applied in the negative direction. For the spring this is
consistent with the convention that positive forces increase the current positional
value. The spring force at terminal p is oriented such that the spring length tends
towards the equilibrium l 0 . At terminal n the force is correspondingly oriented in
the opposite direction. For the damper, the convention applies that positive forces
increase the relative distance of the two position terminals. The damping force
resists a positive, relative velocity. The descriptions for the application of forces
and velocities will not be illustrated here. They correspond with the applicable
descriptions of sources for currents and voltages.
LIBRARY disciplines -- Reference to a package with the
USE disciplines.Kinematic_system.all; -- mechanics declarations
ENTITY damper_trans IS -- Interface description
GENERIC (b: REAL); -- Damper constant
PORT (TERMINAL p, n: kinematic); -- Terminals
end damper_trans;
ARCHITECTURE simple OF damper_trans IS -- Architecture ‘simple’
-- Declaration of potential/flow = deflection/force ...
QUANTITY tdisp ACROSS tforce THROUGH p TO n;