代写Matlab Simulink Simulation: Converter circuits调试Matlab程序
- 首页 >> Python编程Matlab Simulink Simulation: Converter circuits
Objective:
To use Matlab for supporting the learning in Power Electronics circuits.
Installing Matlab and Simscape Electrical app:
download and install Matlab from this
link if you have not done so:
When you install Matlab, make sure you also install Simulink and the Simscape Electrical app in the package.
If you already have Matlab and Simulink installed, but not the Simscape Electrical app, you can go to the APPS tab, click on "Get More Apps", as shown below
In the pop-up window, type in "Simscape Electrical" in the search box located on the upper righthand corner, and clear search filters by clicking the "x" on "Clear Filters", as shown below, before starting your search.
Once you see the "Simscape Electrical" app in the search result, you can start installing the app.
Simulation Procedures for newer Matlab versions (e.g. R2023b or R2024b):
1. Start Matlab
2. Start Simulink by typing in “Simulink” in the command windon as shown in Fig. 7. Simulink will launch, as shown in Fig. 8.
Fig. 7 Starting Simulink
Fig. 8 Simulink window
3. Start a bland model by clicking “Blank Model” button. A new blank Simulink window will launch.
4. In the new window, click “Library Browser” button on the top menu, as shown in Fig. 9.
Fig.9 New Simulink window with library browser
Most of the required blocks are under “Simscape/Electrical/Specialized Power Systems/Power Electronics” . You can also launch a standalone library browser as shown in Fig. 10.
Fig. 10 Power Electronics library
5. In addition, you will also need other common Simulink blocks, such as the “Scope” block in the “Sinks” for your project as well. They are under the Simulink library at the top of the library list.
Fig. 11 The blank Simulink model
6. Drag and drop the “powergui” block from “Simscape/Electrical/Specialized Power Systems” in Simulink Library Brower (Fig.5)
7. Construct a simple single-phase half-wave full-control converter in the new model.
8. You may need to the following blocks for constructing the converter.
9. Set the blocks with the proper values
AC Voltage Source: Peak amplitude (V), Phase (deg), Frequency (Hz)
Pulse Generator: Period (secs), Pulse Width (% of period), Phase delay(secs)
RLC Branch: Branch type, Resistance (ohm), Inductance (H)
Scope: Number of axes
10. Your model should look similar to the one shown in 12
Fig. 12 Single-Phase Half-Wave Full-Control Converter
11. Change the simulation stop time to 1 (sec).
12. Save your model and click the green “run” button on top of the menu to start the simulation.
13. To see the results, you may need to double-click the “scope” icon. Your results should look similar to Fig. 13
Fig. 1 Results for the model shown in Fig. 6
Simulation Procedures for older Matlab versions (e.g. R2020a) :
If you are using a newer version, such as R2023b, please go to the next section.
1. Start Matlab
2. In order to use the Simulink models contained in Simscape Electrical blocks, you need to load the powerlib library. In the Command Window, type powerlib to load the power electronic library as shown in Fig. 2. The powerlib is shown in Fig. 3, and the blocks in the Power Electronics library is shown in Fig. 3.
Fig. 2 The powerlib in Matlab
Fig. 3 The powerlib library
Fig. 4 The general Simulink Library A
3. In addition, you will also need other common Simulink blocks, such as the “Scope” block in the “Sinks” for your project as well. They are under the Simulink library at the top of the library list.
Fig. 5 The blank Simulink model
4. On the top of the Matlab window, click “Simulink Model” in the “New” button
5. Drag and drop the “powergui” from the powerlib to the model (Fig.5)
6. Construct a simple single-phase half-wave full-control converter in the new model
7. You may need to the following blocks for constructing the converter.
8. Set the blocks with the proper values
AC Voltage Source: Peak amplitude (V), Phase (deg), Frequency (Hz)
Pulse Generator: Period (secs), Pulse Width (% of period), Phase delay(secs)
RLC Branch: Branch type, Resistance (ohm), Inductance (H)
Scope: Number of axes
9. Your model should look similar to the one shown in Fig. 6
Fig. 6 Single-Phase Half-Wave Full-Control Converter
10. Change the simulation stop time to 1 (sec).
11. Save your model and click the green “run” button on top of the menu to start the simulation.
12. To see the results, you may need to double-click the “scope” icon. Your results should look similar to Fig. 7
Fig. 7 Results for the model shown in Fig. 6
Discussion:
1. Based on the results from Matlab, find the mean voltage of the converter
2. Compare the mean voltage evaluated in Matlab and that from the theoretical calculation.
a. Write down the equation for calculating the mean voltage.
b. Find the mean voltage based on the theoretical equation
3. Discuss any differences identified from the two results.
Report
There is no report required for this lab.