How to create window in matlab that can take some samples of data saved in .mat file and can fed into the simulink model at every 0.5 sec time step ?

5 visualizaciones (últimos 30 días)
I am working on fault detection and fault classification in power system transmission line using wavelet transforms and ANN in MATLAB/Simulink. I have built a power system model in MATLAB/Simulink where, I have collected the input (fault coefficients m, n, p, q) and output data (fault type) using the wavelet transforms code and then I have trained the data of input and output using ANN. Now to test the data in running mode, whether the ANN is able to detect the correct type of fault or not, For this I have to create the window that can take some samples of data of fault current at 0.05 sec time step and it will feed to the subsystem (in simulink model) where the wavelet transforms code has been dumped, so as to calculate the fault coefficients and then ANN controller will detect the type of fault based on this fault coefficients. Again in the next 0.05 sec time step, the window will take next samples of fault current data and again it will feed to the subsystem (in simulink model) where the wavelet transforms code has been dumped, so as to calculate the fault coefficients, and this cycle continues. In this way collection of samples of fault current data by the window will take place until 0 to 5 sec total simulation time. I have fault current data of three phase currents which is in the form of 100001X4 matrix saved in the .mat file format. Can anybody atleast give me the suggestion, how to apply the logic for creating this window (may be in the form of matlab code).

Respuestas (1)

Gowtham
Gowtham el 10 de Oct. de 2023
Hello Tanu,
I understand you want to use MATLAB to read data from a MAT file and feed this data into a running Simulink Model.
It is worth noting that editing the Simulink model while it is running is not possible. However, we can achieve a similar scenario by utilizing feedback loops.
To incorporate the Neural Network steps, you can implement each step within a sub-system. The output of each sub-system can then be fed back to the model as an input after processing it using a MATLAB function.
This approach serves as an alternative to saving the data in a MAT file. By using feedback loops, we can simulate the desired functionality and seamlessly integrate the Neural Network steps into the Simulink model.
Please find below a sample Simulink Model that demonstrates a concept similar to the desired behaviour.
This model takes an input consisting of time and corresponding values. In each iteration, it doubles the sum of the previous iteration's result and the current value. This process showcases the iterative nature of the Neural Network model.
Kindly refer to the following MATLAB documentation for further information on how to use ‘feedback loops’ https://www.mathworks.com/help/control/ug/closing-feedback-loops-with-time-delays.html
Hope this helps.
Best Regards,
Gowtham

Categorías

Más información sobre AI for Signals and Images en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by