PDA

View Full Version : Analyze a Simple Circuit


haihoang_boy
02-01-2017, 08:37 PM
Introduction
In this section, you
- Obtain the state-space representation of your model with the power_analyze command
- Compute the steady-state voltages and currents using the graphical user interface of the Powergui block
- Analyze an electrical circuit in the frequency domain

Electrical State Variables
The electrical state variables are the Simulink® states of your diagram associated to the capacitor and inductor devices of the Simscape™ Power Systems™ blocks. Inductors and capacitors elements are found in the RLC-branch type blocks such as the Series RLC Branch block, Three-Phase Parallel RLC Load block, in the transformer models, in the PI Section Line block, in the snubber devices of the power electronic devices, etc.

The electrical state variables consist of the inductor currents and the capacitor voltages. Variable names for Simscape Power Systems electrical states contain the name of the block where the inductor or capacitor is found, preceded by the Il_ prefix for inductor currents or the Uc_ prefix for capacitor voltages.

State-Space Representation Using power_analyze
You compute the state-space representation of a model with the power_analyze command. Enter the following command at the MATLAB® prompt.

[A,B,C,D,x0,electrical_states,inputs,outputs]=power_analyze('power_gui')

The power_analyze command returns the state-space model of power_gui example model in the four matrices A, B, C, and D. x0 is the vector of initial conditions of the electrical states of your circuit. The names of the electrical state variables, inputs, and outputs are returned in three matrices.

See the power_analyze reference page for more details on how to use this function.

Steady-State Analysis
Open the power_gui example model by typing power_gui at the command line. In the Powergui block, in the Tools tab, select Steady-State. This opens the Powergui Steady-State Voltages and Currents Tool window where the steady-state phasors voltages measured by the voltage measurement and current measurement blocks of the model are displayed in polar form.

[Only registered and activated users can see links]

Each measurement output is identified by a character vector corresponding to the measurement block name. The magnitudes of the phasors correspond to the peak value of the sinusoidal voltages.

From the Powergui Steady-State Voltages and Currents Tool window, you can also display the steady-state values of the source voltage or the steady-state values of the inductor currents and capacitor voltages by selecting either the Sources or the States check box.

[Only registered and activated users can see links]

Refer to the section Measuring Voltages and Currents for more details on the sign conventions used for the voltages and currents of sources and electrical state variables listed in the Steady-State Tool window.

Frequency Analysis
The Fundamental Blocks/Measurements library contains an Impedance Measurement block that measures the impedance between any two nodes of a circuit. In the following two sections, you measure the impedance in the power_gui model by using two methods:
- Automatic measurement using the Impedance Measurement block and the Powergui block
- Calculation from the state-space model

Obtaining the Impedance vs. Frequency Relation from the Impedance Measurement and Powergui Blocks
The process to measure a circuit impedance from the state-space model (which is described in detail in the next section, Obtaining the Impedance vs. Frequency Relation from the State-Space Model) has been automated in a Simscape Power Systems block. In the power_gui example model, two Impedance Measurement blocks of powerlib measure impedance at two points in the model. Delete the Impedance B3 block and reconnect the Impedance B1 as shown.

Measuring Impedance vs. Frequency with the Impedance Measurement Block

[Only registered and activated users can see links]

In the 150 km Line block, set Number of pi sections to 1, and click OK. Open the Powergui dialog. In the Tools tab, select Impedance Measurement. A new window opens, showing the list of Impedance Measurement blocks available in the circuit.

Fill in the frequency range by entering 0:2:5000 (zero to 5000 Hz by steps of 2 Hz). Select the logarithmic scale to display Z magnitude.

[Only registered and activated users can see links]

When the calculation is finished, the window displays the magnitude and phase as functions of frequency. In the 150 km Line block dialog box, set the Number of pi sections to 10. In the Powergui Impedance vs Frequency Measurement tool, click the Update button. The block dialog box displays the frequency response for the new circuit.

[Only registered and activated users can see links]

Obtaining the Impedance vs. Frequency Relation from the State-Space Model

Note: The following section assumes that you have Control System Toolbox™ software installed.

To measure the impedance versus frequency at the same node where the impedance measurement block is connected, you need a current source providing a second input to the state-space model. Open the Electrical Sources library and copy the AC Current Source block into your model. Connect this source, as shown below. Set the current source magnitude to zero and keep its frequency at 60 Hz.

AC Current Source at the B2 Node

[Only registered and activated users can see links]

Impedance at the Measured Node as Function of Frequency

[Only registered and activated users can see links]

This graph indicates that the frequency range represented by the single line section model is limited and the 10 line section model gives a better approximation for higher frequencies.