Monday 30 September 2019

matlab - Trying to simulate a simple micro inverter, Cant connect scope


I am trying to simulate a simple Micro inverter. Below is my Simulink Model :-


enter image description here


But somehow i am unable to connect Voltage Sensor to a scope. Even if i used a DC Source instead of Solar Cell.


What i have done is :-




  1. Connected two capacitors in parallel with the Solar Cell/ DC Voltage Source to distribute the voltage.





  2. Using two Thyristors each with antiParallel diode and using Resistive Load, I am trying to measure Voltage and Current of the Load Branch.




Issue : -


Voltage Sensor and The Current Sensor i am using is from Simscape/Electrical Sensor Library, but i am unable to connect it to a Scope or a MUX. How do i read my load outputs?


I am fairly new to EE SE & Simulink, so if any additional info is needed, Please drop a comment.


Thanks..



Answer



You are using SimScape, the physical simulation engine within Simulink. This is apparent from the use of "Domain Styles" for the interconnections




  • Electrical = Blue

  • Gas = Purple

  • Hydraulic = Mustard

  • Magnetic = Purple

  • Mechanical = Green

  • Thermal = Orange

  • Liquid (thermal) = Yellow

  • Fluids = L.Blue.



The 1st issue on your diagram is you are using the SimPowerSystems "PowerGUI" This is the legacy electrical domain & this block is needed for the other "specialised technology" blocks.


You have already started using base SimScape and this is the "modern" method & as such you need to place a Solver block to the gnd reference


Your actual question: How do i read my load outputs?


Simulink has multiple simulation domains. The base domain is the SIMULINK domain & in this domain the classic scopes,mux, etc exist.


There is then the PHYSICAL-SYSTEMS domain. This is fundamental domain of simscape and this is where physical signals can cross physical domains.


Finally there are specific domains that are listed above. Everything within the electrical domain can interact. Everything within the mechanical domain can interact. You cannot mix the two. The voltage sensor will create a signal in the PHYSICAL domain but this only facilitates interfacing with other simscape blocks. To interface with simulink you need a PS-Simulink converter


Below is an example of what you need todo



  1. remove the PowerGUI

  2. Attach the solver block to a node in the electrical domain (trace=BLUE)


  3. Connect voltage sensor to the electrical domain (trace=BLUE)

  4. Connect output of sensor to a PS-Simulink block (trace=BROWN)

  5. Connect output of converter to scope (trace = BLACK)


enter image description here


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...