Science topic

# Simulink - Science topic

Simulink, developed by MathWorks, is a commercial tool for modeling, simulating and analyzing multidomain dynamic systems. Its primary interface is a graphical block diagramming tool and a customizable set of block libraries. It offers tight integration with the rest of the MATLAB environment and can either drive MATLAB or be scripted from it. Simulink is widely used in control theory and digital signal processing for multidomain simulation and Model-Based Design.

Questions related to Simulink

Can anyone suggest me or send me the MATLAB/SIMULINK file of optimization techniques based MPPT algorithm for solar photovoltaic systems??

I heard that Ansys Mechanical or AAS can help but is there any way of doing that?

I want to do Open loop analysis of BLDC motor. While doing so, when I want to connect BLDC motor block with 3-phase inverter in Simulink, it don't let me to connect it. This is the desired circuit which I want to connect it with.

You can send me the file at kwadwoagyare0812@gmail.com , thank you

it was available in previous version under (S-Function-Simcoupler) simcoupler provides interface between PSIM and Matlab/Simulink for co-simulation.

I've made a simple simulation on Simulink consisting on a PV panel, dc-dc converter, resistive load and a function block acting as a MPPT running the code for grey wolf algortihm

When I increase the solar radiance, the current from the panel (2nd graph) starts fluctuating. When i decrease the the solar radiance, the voltage from the panel (4th graph) starts to fluctuate. Further more, if the change the value of the load resistor to 100 ohms from 10 ohms, both the current and voltage goes crazy.

I have no idea what is causing this and was hoping someone could point out my mistake. I have attached the pictures below along with the simulink file. I am willing to provide more information if needed.

How do I extract transient stability post-fault response data from IEEE 16 Bus power system Simulink model for classification

I'm running a real-time model with Simulink/dSPACE DS1104. I have to make it first in MATLAB Simulink, compile it to C and download it on PCI( dSPACE 1104).

1- My sample time is 1.6e-5 s and I want to feed an RNN block with 2000 data (32 ms) via Buffer block. But I get an overrun error. I'm wondering what's the maximum available data that the RNN block can receive in this situation and how I can increase it.

2- My alternative solution is to make the problem simpler. Where a Buffer block with 64 data is enough. here the RNN block sample time is (T_r = 64*1.6e-5). but again I'm getting overrun error and I guess T_r is not enough for RNN block operation. If it's the reason how I can give the RNN block more time and skip some data? For example, receive receives data [1:64], calculate them in 9*T_r, skip [65:640] and again receive [641:704]?

I am trying to simulate BTMS based on immersion cooling system by using the software Matlab Simulink but until now I did not get the correct process neither the good results.

What do you think please ? For this type of system , it is oky to use 1D simulation ?

Moreover , if you have any sources that can help me on my simulation ,I will be so gratiful .

Thank you,

Sara

Hello. I am trying to implement space vector pwm control for permanent magnet motor. In my work the permanent magnet motor is represented by two 3d look up table based flux maps. I have generated necessary switching signals for the universal bridge block which works as an inverter. My plan is to measure the three phase voltages with three phase V-I measurement block and then use park transformation to convert the abc voltage to d-q voltage values which after some mathematical operation will be inputs to the look up tables. However, I am facing two issues.

(1) I can not connect the output of the three phase VI measurement to a multiplexer through which I can connect the three phase voltages to the abc to dq0 block (as highlighted in the attached image). Is there any converter block required so that they can be connected?

(2) I need to measure the phase voltages (phase to ground). However, in my model there is ground connection. Will I be able to measure the phase voltage?

Hi everyone,

I want to use the Casadi optimization package for my NLMPC controller in Matlab/Simulink.

I read the examples of https://web.casadi.org/ site, but I can't modify them for my problem.

I want to use Casadi for the tacking problem, so I will have a time-varying cost function and I have time-varying constraints as well.

All the examples which I saw aren't included the time-varying cost function or time-varying constraints.

I would be grateful if anyone can help me.

Regards,

Hossein.

I am trying to simulate the PV module model with varying irradiation (after considering the beam, diffuse and reflected). I have modeled the the PV module using the mathematical equations in Simulink and managed to get the P-V & I-V curves for constant values. But I get error when I input a signal. If anyone know how do this to kindly assist.

I'm trying to understand how the Belbic system works but i'm having some problems. The plant can track my deisred rerence but i can not see any learning dynamic

Hello i hope Ur doin great.

i would like to share with my problem which blocked me 2 weeks. and i need a help. my project was to implement the LQR control of a bidirectional dc-dc converter for EV charging, i have done the averaged mathematical model of my converter and the design of the observer and the LQR control (correctors), when i went to the simulation in MATLAB/SIMULINK I Found that the mathematical model converge to the references but the physical model does not converge i tried everything but i did not succeed, i have based on the file below ?

i really need Ur help.

I share with you the simulink model of the sliding mode control technique applied to a DFIG-based wind power system

Link to download the simulink file: https://fr.mathworks.com/matlabcentral/fileexchange/124140-sliding-mode-dfig-wind-turbine?s_tid=prof_contriblnk

Hello, I have a PWM signal having a variable frequency. I need to remove high frequencies from PWM. For example, I want to stop frequencies above 20kHz and can pass frequencies below 20kHz. Any idea how to design this technique in MATLAB Simulink?

Thank

I want to make weak grid in Simulink using PV-Battery Systems and then to apply fuzzy control logic system to stabilize the voltages and frequency of weak grid efficiently.

Suggest me any efficient model and technique to get some results.

hi

looking for an article about EVs simulation in Matlab's Simulink

Hi I have question how can I model and simulate circuit breaker in Matlab/Simulink mentioned in subject with specific trip curve …

Thanks for advices …

Hi all,

In matlab, we are able to find many features in the control system design applications but it always requires specifying the system inputs and outputs to be able to generate its A, B, C, D matrices. However, for an autonomous microgrid, the system has no inputs and outputs which means we only have the A matrix only. How to get the A matrix ? and how could we avoid specifying those inputs/outputs while linearizing the model ?

I trying to design IEEE 9 bus model in MATLAB Simulink. However, after inserting values of all parameters according to the IEEE standard, the load flow analysis is not working. It shows an error with propagation speed. Can anyone help me to solve it?

Example of model predictive control based on MATLAB/Simulink. In operation, 'quadprog' function is not supported by external generated code. How to solve this problem? Or how to replace the function to achieve MPC program generalization, easy to understand students?

The object and its state space equation are known. It is expected to realize a method of MPC generalization that is easy for students to understand, and to realize hardware-in-the-loop experiment in Simulink environment.

My research is based on:

**OPTIMIZATION APPLICATION ON SMART GRID FOR OPERATIONAL****PLANNING AND MINIMIZATION OF POWER LOSSES ON BOTH TRANSMISSION**

**AND DISTRIBUTION NETWORKS USING MATLAB/SIMULINK**

**How can some assist me from the basic concept of MATLAB? Simulink to get started with this work?**

What is the difference between a conventional rectifier and an ultrafast rectifier in MATLAB/Simulink?

I got five angles from the genetic algorithm to eliminate certain harmonics. Now how should I use these angles in Simulink for generating switching pulses? Do you have any resources including SHE PWM simulation details or any demo file?

Dear Colleagues,

I want to ask about the reasons for obtaining always positive magnitude in dB and phase always greater than -180 in Bode plots when checking the stability by linear analysis tool in Simulink and what this indicates about the system stability?

I am grateful in advance.

How to calculate and design LCL filter for harmonic reduction in matlab simulink?

Hello, I have used multiple PID/PI/PD controllers in my model. The controllers are really difficult to tune or autotune individually. I would appreciate it if you could help me find a better way to tune in MATLAB/Simulink instead of using the auto tuning option.

Hello, I need a model to simulate the electrolysis process using solar panels. Can you help me?

Thank you

I am currently working on my undergraduate thesis which involves the "Non-Linear Neural Control of a Quadratic Tank Process with Delays using Internal Model Control". I have obtained the mathematical models for the plant under minimum phase and non-minimum phase operating conditions. The transfer function of the plant is a 2x2 transfer function matrix.

However, as a beginner, I am quite confused about the next step to take towards representing the built models in MATLAB & SIMULINK, obtaining data from the built models in MATLAB&SIMULINK, the algorithms to use to train the neural networks for modeling the plant, and the controller in the IMC structure, and how to validate the performance of the neural network algorithms generally.

I will appreciate any help or pointers to help me resolve my dilemma, Thank you!

Hello everyone,

I am currently working on energy management in micro grids using agents. I have already implemented my testbed under matlab/simulink, and now I am working with jade.

I need please your suggestions concerning the connection between simulink and jade. I had a look at Macsimjx tool, however it requires Jade version 3.6.1, can anyone provide me with a link to download this version? or any other suggestion to help me with the connection?

Thank you very much

What all inputs and outputs have to be fed into the input and output of this block?

I have an input sine signal, an output from quantizer and an output from zero order hold in a sigma delta ADC.

i will train neural network off line with dataset ,the performance is very good, but when i use the neural network block in model Simulink don't give better results, the type of solver and the does affect in the results ? note that the model Simulink works in discrete time

I am working on the analytic signal concept for observing the frequency variation in the faulted phase current waveform in MATLAB/Simulink model. In MATLAB/Simulink model, I have used analytic signal block and hilbert's transform method to calculate the real and imaginary components of the faulted phase current. After that I have used the data of real and imaginary components of the faulted phase current to calculate the magnitude, phase, and instantaneous frequency. When I plotted the curve between the instantaneous frequency variation vs time for the faulted phase current, I observed that the frequency variation is negative in the curve of instantaneous frequency vs time for the faulted phase current. Why it is so ?

I am working on the analytic signal concept for observing the frequency variation in the faulted phase current waveform in MATLAB/Simulink model. In MATLAB/Simulink model, I have used analytic signal block and hilbert's transform method to calculate the real and imaginary components of the faulted phase current. After that I have used the data for real and imaginary components of the faulted phase current to calculate the magnitude, phase, and instantaneous frequency. When I plotted the curve between the instantaneous frequency variation vs time for the faulted phase current, I observed that there are high frequency spikes in the curve. What can be the reason and what is this phenomena called ?

Hi All,

I'm working on a Matlab-Simulink project related to PV arrays. The Simulink model contains more than 50 modules connected in series, due to which the simulation process takes a lot of time to complete.

Any suggestion to increase speed?

Any help is highly appreciated.

I have simulated a DC-DC converter with a switching frequency of 10 kHz. I need to obtain the averaged values of the measured signals like capacitor voltage and inductor current by filtering the switching measurements. I've tried using the Simulink "Mean" block with a frequency of 10kHz, but as can be seen in the following picture, it does not result in the averaged signal, which should be a straight dc signal(the red curve) as the converter is in steady state. Can you provide a reference that introduces a systematic way to obtain the average value of a switching waveform?

I am using the Fuzzy Controller in MatLab R2017a. But when I execute the controller, it gives an error:

**Error in 'model3_FUZZY/Fuzzy_PID_Controller/FuzzyController': Initialization commands cannot be evaluated.**

**Caused by:**

**Struct contents reference from a non-struct array object.**

The files are also given. Kindly guide me, How do I proceed, and remove this error.

How can I make a connection between FPGA and Simulink?

I want to use FPGA-In-the-Loop (FIL) and my purpose is performing altera board DE1-soc and Simulink.

Unfortunately I haven't found a way to do that yet if it's even possible.

Please leave any suggestions.

Best regards

I am trying to model SMA in Simulink (MATLAB). can anyone here help me to model SMA?

A mathematically modeled one. Thanks.

I have created simple QPSK model in Simulink using the different blocks of, QPSK mod and demod, AWGN channel and raised cosine tx and rx filter. Firstly I used the random integer in simulink it works perfectly. But, now I am calling the signal from workspace using the signal from workspace block and I am receiving the 50 % bit error rate. It as giving an error inconsistent sample time does this impact they BER level or not. If anyone face this kind of issue in Simulink, and resolved it please help me.

Thanks

I was wondering if anyone has experince in tranining a neural network in simulink. I tried a couple of methods, they work in offline, however do not work well with the simulink. Any advice is much appreciated. Thank you

I am trying to simulate a Perturb and Observe and Incremental Conductance MPPT algorithm in Simulink for an PV array.

However I am maxing up the PWM duty cycle to maximum possible value of duty cycle (i.e. 85%). If I manually set the duty cycle using pulse generator I get maximum power between 30% to 35% but in my simulation it does directly to 85%.

The same algorithm is working properly on physical hardware but not on Simulink.

The following two blocks cannot be connected in series:

Block 1: 'A_stator: Asynchronous Machine pu Units'

Block 2: 'phase_A: Three-Phase Series RLC Load'

The first block, modeled as a current source, cannot be connected in series with the inductive element of the second block.

Add a high-value resistance in parallel with one of the two block.

I am trying to use hydrogen produced from the Alkaline electrolyzer in production of Green Ammonia. I have researched online and found most of the ammonia synthesis are done in Aspen plus or HYSYS or dwsim or similar like that.

I am trying to make Ammonia synthesis model in MATLAB but I am having problem in here. Originally I am not the chemical engineering student, so I don't know much of dynamic mass and energy balance. Is there a good resource which I can use for modelling Ammonia synthesis in MATLAB?

Alkaline electrolyzer model is made on MATLAB simulink, so I am trying to make Ammonia synthesis model on MATLAB too.

Please help me in here if you know something.

In MATLAB, I'm attempting to transform my model from continuous state space to discrete state space. The error occurred is "Matrix is Singular to working precision." Please, someone assist me.

A =[0 1.0000 0 0;

51.6923 0 0 0.0221;

0 0 0 1.0000;

-51.6923 0 0 -0.5361]

B =[0;

-0.3412;

0;

8.2597]

Q=[1 0 0 0;

0 1 0 0;

0 0 1 0;

0 0 0 1]

C=[1 0 0 0;

0 0 1 0]

D=[0;0]

R=1;

K=lqr(A,B, Q, R)

q1_int=0.01;

q1_dot_int=0;

q2_int=0;

q2_dot_int=0.01;

%converting our continuous state space model to discrete-time

fs=20;

T=1/fs;

Ad=expm(A*T)

Bd=(Ad-eye(4))/A*B

I would like to perform a tolerance analysis of a CLLC topology using matlab simulink. But the main constraint is the simulation speed. It takes almost 20mins to perform one simulation . The switching frequency of the model is 200KHz. The simulation step size is 1e-8. I am currently using the circuit simulation model. i would like to perform some 2000 simulations using monte carlo approach. This can cost me more time. Is there any better solution available?

Can gams works online with matlab simulink so that optimization is done in gams and send online to simulink model ??

- hello every one i Need help for modeling Electric véhicule with Matlab and Simulink using PMSM motor and dc/ac Converter

I want to have a normal distribution of PV or Slack bus voltages in order to calculate the mean and the variance... The results of the simulation always give a constant value for the slack and PV bus as the voltage have to be known and predefined.

Dear respected

I would like to implement Automatic Switch between two PV panel Depending on output voltage (Exactly I mean depending on the shading ) to change connection form series to parallel or from parallel to series .... I implement it hardware by using two relay but in Simulink I can not do it

so how I can implement below image as MATLAB Simulink ?

kindly any one can help ?

hello,

I'm trying to plot dissipated power of suspension damper Vs frequency plot from 2-dof Quarter car model in MATLAB Simulink. I'm attaching the image of plot can any one help me to get this type of plot from 2-dof Quarter car model in MATLAB Simulink. It will be be very helpful to procced my work further and i will be extremely thankful to help me.

I'm also attaching 2-dof Quarter car model in MATLAB Simulink and the article which I'm following to plot (Follow equation (30) and figure 5(A) of the article attached ). Please find the attachments and hope positive response.

Kindly help me.

Anybody Please help me. if anyone having any explanation or solution regarding above mentioned my problem kindly contact me on my mail id 20pmee08@iiitdmj.ac.in.

I m designing a PV plant that is able to supply an off grid community with power. This error occurs when I try to simulate the model. It occurs in a MEAN block in a charge controller that I made, the controller in directly connected to the P & O algorithm.

Reject percentage is the percent of reject flowrate allowed to leave RO or UF membranes,

Reject % = reject flowrate/ feed flowrate x 100% = (feed flowrate - permeate flowrate)/feed flowrate x 100%

By controlling the reject valve, the pressure difference can be controlled to prevent damage to RO/UF membranes.

Dear All,

How can I make Matlab/Simulink exclude inter-harmonics when calculating THD value??, because its FFT tool in powergui block includes inter-harmonics in calculations.

I have used Casadi in interpreter mode and through mex file. However, the script is not very flexible, especially when the control problem involves tracking of an arbitrary reference signal. Have anyone tried ICLOCS, Acado or other tools in Simulink? Kindly share your experience.

When the main m file (script) is executed around 5 files are loaded and values are assigned to variables, four user defined functions are also called and output is plotted in the graph inside the main file. How can these all be represented in Simulink model with a main script code?

Hi

Anyone tried or have some reference on how to create Docker Container from Simulink ?

Thanks in Advance.

MATLAB reference on creating Docker Container from MATLAB function :

I have a simulation on MATLAB Simulink. I run the simulation and I can view the results on scopes. I can save the results from scopes as MATLAB figures, etc. I can also save the workspace (full or partial).

What I want to do is that when I close the simulation, and open it again, it should be at the point where I closed it. In other words, I want to run a simulation and save it in such a way whenever I need it, I just need to open that file without the need to run it again. In this way, I do not have to save all the results of the scopes one by one. This will speed up my work. It will also help me to save my hard disk space. Moreover, I will not have to spend time to decide which result is important and which is not. I can just open a pre-run simulation and view my required results.

Hello,

I am doing a Matlab/simulink simulation based on microgrid control using model predictive control. In my simulation, I have a 3-phase grid with PV and battery storage. The main goal is to control the system using MPC at a very precision level. Initially, I am feeding frequency at PCC as a variable to the MPC. Whenever I run the simulation, the error has occurred since the 3-phase grid has constant parameters. In that case, how can I resolve this? Or, if anyone has any simulink file for MPC in MG can share. I will really appreciate your help.

Thanks

A random signal means a varying signal over a small time.

Hi all,

i am currently working on my Master degree to implement an adaptive control Law , so i need to program a control loop for the Pixhawk over simulink, i worked on it for 3 week and i still not have a convincing result , the drone oscillate a the take-off and i don’t know what’s wrong with all my methodology , the pictures here resume the PID loop that i have programmed on simulink maybe someone can help me with this .

Error in port widths or dimensions. 'Output Port 1' of 'variable_speedwith_gearratio/Permanent Magnet Synchronous Machine/Electrical model/abc2qd/Mux3' has 46 elements. This port does not accept the dimensions (or orientation) specified by the output signal.

Previously we worked on STATCOM modeling on Simulink and observed its effects in a grid-integrated wind power plant. As a progression of that work, we are looking for areas of original research on this topic where we can contribute. What are some potential 'new' research problems in this field?

Hi,

I have been trying to do some simulations on Simulink on a 3s2p PV configuration, without using bypass diodes and keeping different shading levels.

I keep 5 modules at 1000 W/m2, and vary irradiance on one module from 1000 and lower. I'm able to simulate till 944 W/m2 but below this level, I get singularity issues that I'm not able to solve. The error i get is as below:

Derivative of state '1' in block 'solarmodulesShadingAalysisInternally/PV Array1/Diode Rsh/Transfer Fcn' at time 0.0 is not finite. The simulation will be stopped. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)

My question is: is it to simulate PV array without bypass diode? or if it is possible what could e the reason that i get this error.

Hello,

I have a model that I wrote in Simulink environment of MATLAB, now I want to convert it to MATLAB file. Is there any way to do that?

Any help would be greatly appreciated.