Download 7. Analogue simulation in Alecsis
Transcript
7. Analogue simulation in Alecsis
105
model equations. Time derivatives are discretized using formulae given in Chapter 5, where the time-step size is
changing during the simulation run.
7.1.2. Built-in signal generators
Alecsis does not have many built-in signal generators. This is not a drawback since the user can define new
signal generators easily. Some models already exist in model library. For such description, one can use ideal voltage
and current source as a structural basis, and can add signal function easily in the functional part of the model - an
example of combined structural-functional modelling. Such models are used the same as built-in models.
For example, pulse generator is not an built-in component, although an unavoidable element of time
simulation. It is described as a module whose declaration is stored in a standard library "alec.h", and the body in
the appropriate library (alec.ao). You can find more details about this model in the appendix on standard libraries of
AleC++.
Actually, built-in signal generators are here for historical reasons, as they were needed before language
AleC++ was completed.
7.1.2.3.
Piecewise linear signal generators
Piecewise linear (PWL) sources are built-in components in Alecsis. There are voltage and current piecewise
linear generators, declared as vpwl and cwpl.
It is defined time-value pairs, as in this example:
vpwl vin;
vin (n1, 0) { 2, 3;
4, -4;
6s, -4V;
8.0s, 1; }
The waveform of this voltage generator is given in Fig. 7.1.
Figure 7.1.
Waveform of piecewise-linear voltage generator, given by 4 time/voltage pairs.