Data type mismatch error in Simulink

I am running a simulation of Direct Torque Control of Induction Motor in Simulink. Howeve in sector formation I'm getting the following error:
Data type mismatch. 'Input Port 1' of 'DTC_Trial1/Hystersisis Control and Pulse Generation /Subsystem/Sum1' expects a signal of data type 'boolean'. However, it is driven by a signal of data type 'double'.
I'm not able to understand why this is happening. Any help would be appreciated. Attached file for reference. Thank you.

 Risposta accettata

Pat Gipper
Pat Gipper il 17 Gen 2022
I saw a number of other issues in this model.
1) I think the inverter needs a ground reference added on the emitters of the lower corner IGBTs. Once you do this then you will be able to measure the stator voltages and currents with the Three-Phase V-I Measurement block as needed.
2) The subsystem calculating the sector needs further work. Try using a mod(2*pi) instead of the boolean logic, as I believe you desire to wrap the result. Also it is outputting a sector value of zero, which I think is incorrect. Try adding 1 to the result.
3) The Stator voltage selector using a fnc block that is not compatible with the psi_s input. Should this be an absolute value function?

4 Commenti

Respected Sir,
Thank you for your reply. I did some of the changes you suggested. Adding the ground helped, however there seemed to be an issue with the inverter I used. Hence I replaced it with the block in Simulink. Atleast, now the switching pulses. Still after some time it all goes to zero. I am not able to rectify the problem. I have added the updated files. Any help is appreciated. Thank you again for your reply.
I made some changes shown below in my attachment that seems to have fixed all the problems. Let me know how it works for you.
1) Voltage sensing (Vs_a,Vs_b,Vs_c) are now phase to ground versus phase to phase.
2) Changed the slip speed initial condition to 1 so the induction machine starts from 0 rpm.
3) Added a modulo function in the "Finding sector" matlab code.
4) Swapped the Is_beta and Is_alpha inputs to "Torque Estimation"
Yes sir it's working a lot better now. Though there is some noise in the stator currents, the entire system is working as it was desired and the locus is also obtained. Thank you for the help.
I'm glad to hear it. Switching noise in the stator currents is to be expected with this control scheme.

Accedi per commentare.

Più risposte (1)

Fangjun Jiang
Fangjun Jiang il 14 Gen 2022
  1. The easiest solution is to add a Data Type Conversion block.
  2. The proper solution is to set the proper data type at the relevant blocks.
  3. The related setting is the diagnostic for mismatch data types.

Prodotti

Release

R2020b

Richiesto:

SSK
il 14 Gen 2022

Commentato:

il 20 Gen 2022

Community Treasure Hunt

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

Start Hunting!

Translated by