EE555 Lab06

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

University M'hamed Bougara, Boumerdes.

Institute of Electrical and Electronic Engineering.

Systems Identification.
EE-555L.

Experiment 06
Introduction to Simscape.

Done by:
- OUYAHIA Abdelhalim
- MAHROUCHE Idir

Option: Control
Subgroup: 02

Fall 2016

Introduction:
Simscape provides an environment for modeling and simulating physical systems spanning
mechanical, electrical, hydraulic, and other physical domains. It provides fundamental building blocks from these
domains that you can assemble into models of physical components, such as electric motors, inverting op-amps,
hydraulic valves, and ratchet mechanisms. Because Simscape components use physical connections, your models
match the structure of the system you are developing.
Simscape models can be used to develop control systems and test system-level performance. You can extend the
libraries using the MATLAB based Simscape language, which enables text-based authoring of physical modeling
components, domains, and libraries. You can parameterize your models using MATLAB variables and expressions,
and design control systems for your physical system in Simulink. To deploy your models to other simulation
environments, including hardware-in-the-loop (HIL) systems, Simscape supports C-code generation.
In this lab, we will be using simulink and simscape to model some of the circuits. These tools can be very useful in
modeling electrical and mechanical systems.

I. Creating a new model :


In order to run a Simscape model, we should make sure that our model have a solver configuratin block
that can be connected anywhere in the model and an electrical reference (ground).
Where:
- The solver configuration block can be found in the library browser :
Simscape Utilities Solver Configuration.

Simscape-Utilities box
- The electrical reference (ground)can be found in the library browser :
Simscape Foundation library Electrical elements Electrical Reference.

So the required elements are connected as follow :


Notes :
The blocks can be connected by dragging the curser from
one input or output node to another. while the complet
connection will appear black and the incomplete
connection will appear red.
II.

Creatin the voltage divider :


In this part we will create a voltage divider as simple example to test our knowlege form the previous
parts.
- We drouped two resistors from Electrical element box and connect them to the first model we
created as shown in the figure :

The values of the resistance can be changed by simply clicking on them the following window will appear:

So we can adjust the value and the unit, then click on ok.
In order the power the circuit we drop a DC source from the electrical source box
And connected as follows:

The voltage source can be adjust it by double click on it and enter the wanted value and unit as
shown :

To run our model we need to convert from Simscape (physical signal) to Simulink (numerical data
without unit). This is what is will be shown in the next part.
III.

Converting from Simscape to Simulink:


In order to convert the Simscape model to simulink we applied the following steps:
1. The voltage sensor is connected across the port we want to measure.
The voltage sensor is found in the Foundation Library electrical Sonsor box.
2. We connect a PS-Simulink Converter block to the sensor block
The PS-Simulink Converter is found in the Utilities box.
3. Connect the display block from Simulink library to view the result
The final connection is shown below:

IV.

Simulating the model :


After changing the values of the resistors and voltage source, we change the configuration as
shown in the following figure.

Then we run the design, the output of the simulation is shown below:

Conclusion:
During the work on this laboratory handout, we have taken an acceptable look over the Matlab physical
modeling features presented in the Simscape library. We have found that Simscape is widely used and highly
beneficial through its helpful built-in physical blocks that can be used in parallel with the Matlab powerful numeral
computational capabilities in order to build a wide variety of engineering simulation blocks for different physical
systems, starting from basic electronic, motor systems and simple mechanical and hydraulic systems coming up to
the most sophisticated real-operating systems. We have basically acquired the most basic knowledge about how to
use Matlabs Physical modeling tools.

You might also like