Component library
188 components ship with Systems by Radost IT. Each page lists the ports, parameters, variables and equations the app simulates.
Automotive
Electric drive
- Battery packTraction battery of Ns cells in series and Np in parallel. Each cell has an open-circuit voltage linear in state of charge, a series resistance R0 and one RC pair (R1, C1) for the slow polarization voltage. Current into p charges the pack.
- Traction motor (averaged)Electric drive with its inverter as one power converter. The shaft follows the torque command, limited to Tmax at low speed and to the power Pmax above base speed. The DC side draws the shaft power divided by the efficiency when motoring and returns it times the efficiency when braking. Inertia and electrical dynamics are left out.
Driveline
- Open differentialLossless open differential without inertia. The input turns ratio times as fast as the mean of the two output shafts, and each output carries half of ratio times the input torque, so the wheels can turn at different speeds.
- GearboxLossless five-speed gearbox without inertia. The gear input picks the ratio: below 1.5 first gear, below 2.5 second, and so on up to fifth. Shaft a turns ratio times as fast as shaft b, and shaft b carries ratio times the torque. There is no neutral.
Control
Filters
- Band-pass filterSecond-order band-pass filter (w0 / Q) s / (s^2 + (w0 / Q) s + w0^2). It passes the frequency w0 with gain 1 and no phase shift; the band is w0 / Q wide.
- High-pass filter (2nd order)Second-order high-pass filter s^2 / (s^2 + (w0 / Q) s + w0^2). It blocks constant inputs and passes frequencies above w0. The default Q of 1 / sqrt(2) gives a Butterworth response.
- Notch filterSecond-order band-stop filter (s^2 + w0^2) / (s^2 + (w0 / Q) s + w0^2). It removes the frequency w0 and passes the rest; a higher Q makes the notch narrower.
Controllers
- Discrete PID controllerPID control of the error input, computed every Ts seconds and held between samples. At each sample the integral adds ki Ts times the error (backward Euler), and the derivative is kd times the change in error since the last sample over Ts. The first sample is at t = Ts; before it the output is 0.
- PID with setpoint weight and back-calculationTwo-input PID for setpoint r and measurement m. The proportional term acts on b r - m, the integral on r - m, and the derivative on the measurement only, through a first-order filter with time constant Tf, so setpoint steps cause no derivative kick. The output is limited to ymin to ymax; while it is limited, the integral is pulled back by the excess divided by the tracking time Tt, so it does not wind up.
Linear
- State space (2 states)Linear system x' = A x + B u, y = C x + D u with two states, one input and one output. x1 and x2 start at x10 and x20.
- Transfer function (2nd order)Transfer function (b2 s^2 + b1 s + b0) / (a2 s^2 + a1 s + a0) from u to y, starting at rest. a2 must not be zero; for a first-order system use the first-order or lead-lag block.
Electrical
Sources
- BatteryBattery as an open circuit voltage that rises linearly with the state of charge, in series with a resistance R. Current into p charges it. 1 A.h is 3600 C.
- Constant currentIdeal source that drives the current I. Positive current flows through the source from p to n.
- Constant voltageIdeal source that holds the voltage between p and n.
- Pulse currentIdeal square wave current source: offset + I for the first duty fraction of each period T, offset for the rest. Positive current flows through the source from p to n.
- Pulse voltageIdeal square wave source: offset + V for the first duty fraction of each period T, offset for the rest.
- Ramp voltageIdeal source whose voltage rises in a straight line from 0 at time t0 to V at time t0 + T, then holds V.
- Signal currentIdeal source whose current in A follows the signal input u. Positive current flows through the source from p to n.
- Signal voltageIdeal source whose voltage in V follows the signal input u.
- Sine currentIdeal source with a sinusoidal current I sin(2 pi f t + phase). Positive current flows through the source from p to n.
- Sine voltageIdeal source with a sinusoidal voltage V sin(2 pi f t + phase).
- Step currentIdeal source whose current jumps from 0 to I at time t0. Positive current flows through the source from p to n.
- Step voltageIdeal source whose voltage jumps from 0 to V at time t0.
Basic
- CapacitorIdeal linear capacitor.
- ConductorIdeal linear conductor, the inverse of a resistor.
- GroundZero voltage reference. Every circuit needs one.
- Ideal transformerLossless transformer with turns ratio N1/N2: v1 = ratio v2 and the power into one side leaves the other.
- InductorIdeal linear inductor.
- Mutual inductorTwo coupled coils with self inductances L1, L2 and mutual inductance M. Positive M couples the p pins. Needs L1 L2 > M^2.
- PotentiometerResistor R with a wiper w. The signal input x sets the wiper position, from 0 at n to 1 at p.
- ResistorIdeal linear resistor.
- Variable resistorLinear resistor whose resistance in Ohm is set by the signal input R.
Sensors
- Current sensorOutputs the current from p to n in A. Has no voltage drop.
- Power sensorOutputs the power in W: the current from p to n times the voltage of pv over nv. The current path has no drop and the voltage pins draw no current.
- Voltage sensorOutputs the voltage of p over n in V. Draws no current.
Machines
- DC motorPermanent magnet DC motor: armature resistance R and inductance L, back EMF and torque constant k, rotor inertia J and viscous friction b, driving the flange.
- EMF converterIdeal converter from electrical to rotational power: v = k w and the flange receives the torque k i.
- Voice coilIdeal converter from electrical to translational power, such as a voice coil: v = k speed and the flange receives the force k i.
Semiconductors
- DiodeDiode with the Shockley law i = Is (exp(v / (N Vt)) - 1). Above v = 40 N Vt the current continues along its tangent so the exponential cannot overflow.
- Zener diodeShockley diode in the forward direction that breaks down in reverse: the reverse current reaches Iz at v = -Vz and grows by a factor e every N Vt beyond. Exponents are capped at 40 as in the diode.
Ideal
- Ideal diodeDiode that conducts with resistance Ron when the voltage of p over n is positive and leaks with conductance Goff otherwise.
- Ideal op-ampOp-amp with infinite gain: the inputs draw no current and sit at the same voltage. The output current returns through gnd. Use it with negative feedback.
- Ideal switchSwitch that is closed while the signal input u is above 0.5. Closed it has resistance Ron, open a leak conductance Goff.
- Op-ampOp-amp with finite gain A whose output voltage over gnd saturates at Vmin and Vmax. The inputs draw no current.
Hydraulic
Valves
- Check valveLets fluid pass from a to b only. The opening x rises smoothly from 0 at the cracking pressure to 1 at the cracking pressure plus p_range (cubic smoothstep), and the flow is (G_leak + G x) dp.
- 4/3 directional valveClosed-center, zero-lapped valve with four ports and three positions, moved by the input signal, clamped to -1..1. Above 0 it connects P to A and B to T; below 0 it connects P to B and A to T; at 0 every port is closed. Each open path is an orifice of area |u| times A_max with the same turbulent law and low-pressure blend as the orifice. Used as a proportional or servo valve.
- Pressure relief valveOpens from a to b when the pressure drop passes the set pressure. The opening x grows linearly to 1 over p_range, and the flow is (G_leak + G x) dp.
- Variable orificeOrifice whose flow area is the input signal times A_max. The input is clamped to 0..1. Same turbulent law and low-pressure blend as the orifice.
Sources
- Constant flowPushes a fixed volume flow out of its port into the circuit, drawn from the atmosphere.
- Constant pressureHolds its port at a fixed gauge pressure, like a supply line or a pressurized tank of unlimited size.
- Signal flowPushes the volume flow given by the input signal, in m3/s, out of its port into the circuit.
- Signal pressureHolds its port at the gauge pressure given by the input signal, in Pa.
Actuators
- Double acting cylinderCylinder with two chambers. Chamber A (port a) pushes the rod out, chamber B (port b) pulls it in. The rod force is p_a A_a - p_b A_b. The housing is fixed.
- Fixed displacement pumpIdeal pump driven by a shaft. It moves q = D w from suction a to delivery b and needs the torque D (p_b - p_a).
- Hydraulic motorIdeal motor. Flow from a to b turns the shaft at w = q / D, and the pressure drop drives it with the torque D (p_a - p_b).
- Single acting cylinderCylinder with one chamber. Pressure at port a pushes the rod out with force p A; the rod moving out at speed v draws in A v. The housing is fixed.
Sensors
Basic
- Fluid volumeFixed volume of fluid with a constant bulk modulus. Its pressure rises as fluid flows in: V / K dp/dt = q. Leave port b open for a one-port volume.
- Laminar resistanceLinear flow resistance: the pressure drop from a to b is R times the flow.
- Open tankTank open to the atmosphere with a port at the bottom. The pressure at the port is rho g h; flow into the port raises the level.
- OrificeSharp-edged orifice in turbulent flow: q = Cd A sqrt(2 dp / rho), signed with dp. Below about dp_reg the law blends into a straight line through zero so the solver never meets an infinite slope; well above dp_reg the error is about (dp_reg / dp)^2 / 4.
- PipeStraight round pipe in laminar flow. The resistance follows Hagen-Poiseuille: dp = 128 mu L q / (pi D^4).
- ReferenceZero gauge pressure: the surrounding atmosphere. Pressures in the model are measured against it.
Magnetic
Basic
- Air gapReluctance of a flux path with length l, cross section area A and relative permeability mur: Rm = l / (mu0 mur A).
- CoilWinding of N turns that links an electrical pair to a magnetic pair. Current into p raises the magnetic potential of mp over mn by N i, and the flux out of mp induces v = N dPhi/dt.
- Magnetic groundZero magnetic potential reference. Every magnetic circuit needs one.
- ReluctanceConstant linear reluctance: the magnetic potential drop is Rm times the flux.
Sources
Power electronics
Averaged converters
- Averaged boost converterStep-up DC-DC converter averaged over one switching period, in continuous conduction. The inductor sits at the input: L iL' = v1 - (1 - d) vC and C vC' = (1 - d) iL - i2, where d from 0 to 1 is the duty cycle and i2 the output current. In steady state the output is the input divided by 1 - d. p1 is the input, p2 the output, n the common return. Ripple and discontinuous conduction are not modeled.
- Averaged buck converterStep-down DC-DC converter averaged over one switching period, in continuous conduction. The switch and diode are replaced by their averages, so the inductor sees d times the input voltage: L iL' = d v1 - vC and C vC' = iL - i2, where d from 0 to 1 is the duty cycle and i2 the output current. The input draws d iL. In steady state the output is d times the input. p1 is the input, p2 the output, n the common return. Ripple and discontinuous conduction are not modeled.
- Averaged buck-boost converterInverting DC-DC converter averaged over one switching period, in continuous conduction: L iL' = d v1 + (1 - d) vC and C vC' = -(1 - d) iL - i2, where d from 0 to 1 is the duty cycle and i2 the output current. The input draws d iL. In steady state the output is -d / (1 - d) times the input, so it is negative. p1 is the input, p2 the output, n the common return. Ripple and discontinuous conduction are not modeled.
- Averaged H-bridgeFull bridge of four switches averaged over one switching period. The modulation input m from -1 to 1 sets the output voltage a over b to m times the DC voltage p over n. The bridge is lossless, so the DC side carries m times the output current. Give the output side a reference as well as the DC side.
Switches
- Switch with antiparallel diodeIdeal semiconductor switch, such as a MOSFET or IGBT, with a diode across it that conducts from n to p. The switch conducts from p to n while the gate u is above 0.5. The diode conducts whenever the voltage of p over n is negative, whatever the gate does. Conducting it has resistance Ron, blocking a leak conductance Goff.
- ThyristorIdeal thyristor (SCR). It turns on when the gate u rises above 0.5 while the voltage of p over n is positive, or when that voltage turns positive while the gate is high. Once on it stays on without gate until its current falls below zero. On it has resistance Ron, off a leak conductance Goff. Starts off.
Mechanical rotational
Sensors
- Acceleration sensorOutputs the angular acceleration of its flange, in rad/s2, without loading it.
- Angle sensorOutputs the angle of its flange, in rad, without loading it.
- Speed sensorOutputs the angular speed of its flange, in rad/s, without loading it.
- Torque sensorSits in the torque path and outputs the torque applied to flange a, in N.m, which it passes on to flange b unchanged.
Friction
- Bearing frictionViscous plus Coulomb friction between a shaft (a) and its housing (b). The Coulomb part is smoothed as tau_c tanh(w_rel / w_s), so it never sticks exactly: below w_s the shaft creeps.
- BrakeFriction brake between a shaft and the fixed housing. The input u from 0 (released) to 1 (applied) scales the braking torque u tau_max tanh(w / w_s); u outside 0 to 1 is clamped. The tanh smoothing means an applied brake still creeps slightly under load.
- ClutchFriction clutch between two shafts. The input u from 0 (open) to 1 (closed) scales the friction torque u tau_max tanh(w_rel / w_s); u outside 0 to 1 is clamped. The tanh smoothing means a closed clutch still slips slightly under load.
Sources
- Constant torqueTurns its flange in the positive direction with a constant torque.
- Quadratic load torqueSpeed-dependent load such as a fan or a centrifugal pump: it brakes its flange with the torque k w^2, against the direction of rotation.
- Signal torqueTurns its flange in the positive direction with the torque given by the input signal, in N.m.
- Sine torqueTurns its flange in the positive direction with the torque tau sin(2 pi f t + phase).
- Speed sourceTurns its flange at the angular speed given by the input signal, in rad/s, whatever torque that takes. The flange starts at angle 0.
- Step torqueTurns its flange in the positive direction with a torque that jumps from 0 to tau at time t0.
Basic
- Rotational damperLinear viscous damper between two flanges.
- FixedFlange held at angle 0.
- InertiaRigid rotating body with a flange on each side.
- Rotational spring-damperLinear torsion spring and viscous damper in parallel, untwisted when both flanges are at the same angle.
- Torsion springLinear torsion spring, untwisted when both flanges are at the same angle.
Transmission
- Ideal gearLossless gear without inertia. Shaft a turns ratio times as far as shaft b, and shaft b carries ratio times the torque.
- Ideal wheelWheel rolling without slip and without inertia. The axle advances r times the wheel angle.
- Rack and pinionLossless rack and pinion without inertia. The rack moves r times the pinion angle.
Signal
Math
- Absolute valueOutputs the absolute value of the input.
- BiasAdds a constant to the input: y = u + b.
- Cosine functionOutputs the cosine of the input, read in radians.
- DivideDivides the first input by the second: y = u1 / u2.
- Exponential functionOutputs e raised to the input.
- GainMultiplies the input by a constant: y = k u.
- Natural logarithmOutputs the natural logarithm of the input. The input must be positive.
- MaximumOutputs the larger of the two inputs.
- MinimumOutputs the smaller of the two inputs.
- PowerRaises the input to a constant exponent: y = u^n. A fractional n needs a positive input.
- ProductMultiplies two inputs: y = u1 u2.
- SignOutputs 1 for a positive input, -1 for a negative input and 0 for zero.
- Sine functionOutputs the sine of the input, read in radians.
- Square rootOutputs the square root of the input. The input must not be negative.
- SumWeighted sum of two inputs: y = k1 u1 + k2 u2. Set k2 = -1 for a difference.
- Sum of threeWeighted sum of three inputs: y = k1 u1 + k2 u2 + k3 u3.
Logic
- AndOutputs 1 while both inputs are above 0.5, else 0.
- Greater thanOutputs 1 while u1 > u2, else 0.
- Less thanOutputs 1 while u1 < u2, else 0.
- NotOutputs 0 while the input is above 0.5, else 1.
- OrOutputs 1 while at least one input is above 0.5, else 0.
- SwitchPasses u1 while the control input c is above the threshold, else u2.
Sources
- ChirpSine whose frequency rises linearly from f0 at t = 0 to f1 at t = T and stays at f1 afterwards.
- ClockOutputs the simulation time in seconds.
- ConstantOutputs a constant value.
- ExponentialHolds y0 until time t0, then moves from y0 towards y1 as y1 + (y0 - y1) exp(-(t - t0) / T). Rises when y1 > y0 and decays when y1 < y0.
- PulseSquare wave that starts at time t0: each period T begins with a high part of length duty T at offset + k, then returns to offset.
- RampRises in a straight line from 0 at time t0 to k at time t0 + T, then holds k.
- SawtoothRises in a straight line from offset to offset + k over each period T, then drops back. Starts at time t0.
- SineOutputs k sin(2 pi f t + phase).
- StepOutputs 0 before time t0 and k from then on.
- Time tableReplays measured data: linear interpolation between the points of the table, holding the first and last values outside its range. Load the points from a CSV file in the inspector.
- TriangleRises in a straight line from offset to offset + k over the first half of each period T and falls back over the second half. Starts at time t0.
Nonlinear
- Dead zoneOutputs 0 while the input is between lower and upper. Outside that band it outputs the distance past the nearer edge.
- QuantizerRounds the input to the nearest multiple of the step q, computed as q floor(u / q + 1/2).
- Rate limiterFollows the input with a fast first order lag of time constant T whose rate of change is clamped to rise per second going up and fall per second going down. Choose T well below the time scale of the input.
- Relay with hysteresisSwitches on when the input rises above on_at and off when it falls below off_at, and holds its state in between. Outputs y_on or y_off. Starts on when the input is above on_at at t = 0, otherwise off.
- SaturationPasses the input through but limits it to the range from lower to upper.
Continuous
- DerivativeDerivative with a first order filter: Y(s) = k s / (T s + 1) U(s). Smaller T follows the true derivative more closely.
- First orderFirst order lag: T y' + y = k u.
- IntegratorIntegrates the input: y' = k u, starting from y0.
- Lead-lagLead or lag compensator: Y(s) = k (T1 s + 1) / (T2 s + 1) U(s). T1 > T2 gives phase lead, T1 < T2 phase lag.
- Integrator with limitsIntegrates the input, y' = k u, and stays between lower and upper. At a limit it stops integrating while the input pushes outward, so it leaves the limit as soon as the input turns back.
- Transport delay (first order)Delays the input by L using a first order Pade approximation: (1 - L s / 2) / (1 + L s / 2). Accurate for inputs much slower than L.
- Transport delay (second order)Delays the input by L using a second order Pade approximation: (1 - L s / 2 + L^2 s^2 / 12) / (1 + L s / 2 + L^2 s^2 / 12).
- PI controllerProportional plus integral control of the error input: y = kp u + ki times the integral of u.
- PID controllerParallel PID control of the error input: y = kp u + I + D, where I' = ki u and D = kd s / (Td s + 1) u. The output is limited to the range from ymin to ymax, and the integral term is clamped to the same range so it cannot wind up.
- Second orderSecond order system: y'' + 2 d w y' + w^2 y = k w^2 u.
Discrete
- Discrete integratorAdds k Ts u to the output at every sample, taken every Ts seconds from t = Ts on, and holds the sum in between. At t = n Ts the output is y0 + k Ts (u(Ts) + u(2 Ts) + ... + u(n Ts)).
- Discrete transfer functionSecond-order discrete filter (b0 + b1 z^-1 + b2 z^-2) / (1 + a1 z^-1 + a2 z^-2), computed every Ts seconds and held between samples: y[k] = b0 u[k] + b1 u[k-1] + b2 u[k-2] - a1 y[k-1] - a2 y[k-2]. Set a1 = a2 = 0 for an FIR filter. The first sample is at t = Ts; before it the output is 0.
- Unit delaySamples the input every Ts seconds and outputs the sample taken one period earlier. Samples are taken at Ts, 2 Ts, and so on; the output is 0 until 2 Ts.
- Zero-order holdSamples the input every Ts seconds and holds that value until the next sample. The first sample is taken at t = Ts; before it the output is 0.
Thermal
Sources
- Constant heat flowPushes a fixed heat flow out of its port into the connected body.
- Fixed temperatureHolds its port at a fixed temperature, like a large ambient or a coolant at a set point.
- Signal heat flowPushes the heat flow given by the input signal, in W, out of its port into the connected body.
- Signal temperatureHolds its port at the temperature given by the input signal, in K.
Basic
- ConvectionHeat transfer from a surface (a) to a fluid (b): Q = h A (T_a - T_b).
- Heat capacitorLumped body at one uniform temperature: C dT/dt equals the heat flowing in.
- RadiationThermal radiation from body a to body b: Q = eps sigma A (T_a^4 - T_b^4), with eps the effective emissivity of the pair.
- Thermal conductorLinear heat conduction: Q = G (T_a - T_b).
- Thermal resistorLinear thermal resistance: T_a - T_b = R Q.
Sensors
Mechanical translational
Sensors
- Acceleration sensorOutputs the acceleration of its flange, in m/s2, without loading it.
- Force sensorSits in the force path and outputs the force applied to flange a, in N, which it passes on to flange b unchanged.
- Position sensorOutputs the position of its flange, in m, without loading it.
- Speed sensorOutputs the speed of its flange, in m/s, without loading it.
Sources
- Constant forcePushes its flange in the positive direction with a constant force.
- Position sourceMoves its flange to the position given by the input signal, in m, whatever force that takes.
- Signal forcePushes its flange in the positive direction with the force given by the input signal, in N.
- Sine forcePushes its flange in the positive direction with the force F sin(2 pi f t + phase).
- Speed sourceMoves its flange at the speed given by the input signal, in m/s, whatever force that takes. The flange starts at position 0.
- Step forcePushes its flange in the positive direction with a force that jumps from 0 to F at time t0.
Basic
- DamperLinear viscous damper.
- FixedFlange held at position 0.
- Hard stopFree travel between a lower and an upper limit on the position of flange b relative to flange a. Beyond a limit a stiff spring and a damper push back (penalty contact). The contact force never pulls the flanges into the stop.
- MassRigid mass with a flange on each side.
- SpringLinear spring, unstretched when both flanges are at the same position.
- Spring-damperLinear spring and viscous damper in parallel. The spring is unstretched when both flanges are at the same position.