modelIntegratingCircuit
Integrating circuit vs GSL integration
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
Integrator circuit vs QAG integration routine. input voltage: V0 (1 - e-t/τ1) e-t/τ2
The recalculation of the integral via QAG for each time t is a bit of overkill, but the agreement with the output voltage from the integrator circuit is thereby made clear. The slight difference is due to a combination of the finite timestep for the circuit simulation, the op-amp's behavior, and the relative error in the QAG integrator.
IMPORTANT!!!: The integrand-setup model 'CircuitIntegrand' (or a duplicate) must be run before using GSL integration routines within a larger Modelica model (like this one). (Alternatively, one could edit integrand.c directly and then compile "by hand" in a command window:
gcc -fPIC -c integrand.c integration_mi.c
gcc -shared integration.o integration_mi.o -o libgsl_integration_MI.so [.dll for windows])

Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | n_par | 3 |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Blocks.integration.Integrand | integrand | ||
| Modelica.Electrical.Analog.Ideal.IdealizedOpAmpLimited | opAmp | ||
| Modelica.Electrical.Analog.Basic.Ground | ground | ||
| Modelica.Electrical.Analog.Basic.Resistor | resistor | ||
| Modelica.Electrical.Analog.Basic.Capacitor | capacitor | ||
| Modelica.Electrical.Analog.Sources.SignalVoltage | signalVoltage | ||
| Modelica.Electrical.Analog.Sensors.VoltageSensor | voltageSensor | ||
| Blocks.integration.QAG_quadrature | qAG_quad | ||
| Modelica.Blocks.Sources.Ramp | x_ramp | ||
| Modelica.Blocks.Sources.Constant[n_par] | params | ||
| Modelica.Blocks.Sources.Constant | a_const | ||
| Modelica.Blocks.Math.Add | diff | ||
| CircuitParams | circuitParams | ||
| Modelica.Blocks.Math.Gain[n_par] | RCgain |
Contents
| Name | Description |
|---|---|