Modeling and Simulation: Raul - Ionel@etc - Upt
Modeling and Simulation: Raul - Ionel@etc - Upt
Lecture 1
INTRODUCTION
ni.com [email protected]
Objectives
Understanding the concepts of M&S The Mathematical Model of a system Using MATLAB for circuit analysis implementation Using LabView Control Design & Simulation toolbox for circuit analysis implementation Results validation using the RLC Circuit Analysis MATLAB interface
ni.com
We will analyze an electrical system (simple circuits in our case) by means of mathematical calculations. This is the modeling process. We will obtain the Mathematical Model of a system (MM). Using dedicated programs (Matlab, LabView, NI Multisim) we will simulate the behavior of the system using several test input signals. We will characterize the system using time and frequency domain calculations . Reasons Experts have estimated that board designers dictate 75% of the cost of final printed boards solely based on design choices before the designs leave the CAD stations. Institute for Printed Circuits report, 2008
ni.com
ni.com
If the circuit has zero initial conditions it means that the inductor current and capacitor voltage are both 0 when starting the simulation.
RLC filtering circuit
Step response: the behavior of the circuit after the sudden application of a DC voltage or current. Natural response: the behavior of the circuit after the DC voltage or current source is suddenly disconnected. For this particular case we are interested in representing: -capacitor voltage -inductor current
ni.com
The Mathematical Model (MM) of a system 2nd order circuit. The state variables are: Voltages over Capacitors Currents trough Inductors
i ( t ) i R ( t ) i C ( t ) i L ( t ) - Series connection
di (t ) u in (t ) u R (t ) u L (t ) u C (t ) R i (t ) L u C (t ) dt du C (t ) i(t ) iC (t ) C dt
d 2u C (t ) du C ( t ) u in ( t ) L C R C u C (t ) 2 dt dt
ni.com
The Mathematical Model (MM) of a system Mathematical Model (or Circuit Model): a mathematical relation between the input and output variables. The model describes the evolution of the output variable as a function of the input variable.
d 2u C (t ) du C ( t ) u in ( t ) L C R C u C (t ) 2 dt dt
(1.3)
We assume that: R = 4, L = 2H, C = 2F and that we have found a solution for Uc(t).
d 2 u C (t ) du C (t ) MM: u in (t ) 4 8 u C (t ) 2 dt dt
(1.4)
Using MATLAB: using dedicated MATLAB functions we can create programs (m files) which help us implement complicated mathematical calculations.
ni.com
ni.com
Using LabView Control Design & Simulation toolbox for circuit analysis implementation Using LabView: using Labview models we get familiar with graphical programming and we learn how to analyze a system starting from the mathematical model. A possible solution (not the only one) is to separate the term with the 2nd derivative from the rest of the terms and divide everything by the constant of the isolated term.
d 2 u C (t ) du C (t ) L C u ( t ) R C u C (t ) : L C in 2 dt dt
(1.5)
d 2 u C (t ) du C (t ) 1 ( u ( t ) R C u C (t )) in 2 L C dt dt
We think of the left side of the equation as being constructed from a sum of three elements and a multiplication with a constant. Access the Control Desing & Simulation palette and use the dedicated sub-VIs.
ni.com
(1.6)
Using LabView Control Design & Simulation toolbox for circuit analysis implementation
Block Diagram for the implementation of the RLC circuit Step response.
ni.com
Using LabView Control Design & Simulation toolbox for circuit analysis implementation
Front Panel for the implementation of the RLC circuit Step response.
ni.com
Access the interface by typing the >>rlc_gui; command in the MATLAB Command Window. Select the desired circuit connection and set the values for the components. This tool can be used for checking if the MM which we obtained offers the correct relation between the input and output parameters of interest.
ni.com
Using the circuit schematics and NI Multisim for circuit analysis implementation Using NI Multisim: learn how to implement several analysis procedures starting from the circuit setup.
ni.com
Using the circuit schematics and NI Multisim for circuit analysis implementation
The common details concerning the way in which this program can be operated (saving files, placing components, wiring the circuit, etc.) depends on the experience of the user.
ni.com