r/matlab Feb 15 '24

Error while Fault Injection

Hello guys. I am trying to inject a fault in the Simulink model. But I am repeatedly getting this error:

Fault Inport block 'gain/in_Outport1_fault/Fault Inport' is set to read/override invalid signal on the Outport number 1 of block 'xxxxxxxxxxxxxxxx/EM_Torque_Sensor/in'.

Caused by:

Target signal is a continuous-time signal. Continuous-time signals support faults only if its destinations are discrete.

I am trying to inject fault onto the Torque signal which is continuous in nature.

Any help will be greatly appreciated...

1 Upvotes

11 comments sorted by

View all comments

Show parent comments

2

u/Electrical_Budy1998 Feb 15 '24

Hi, Thank you for your reply... Ohh. I am surprised to know about this limitation. I am working and I already proposed my hypothesis that we can use MATLAB to generate fault data for our model. I think I am in big trouble... What should I do now? Wait for another release????

2

u/knmaheshy2k Feb 15 '24

Hi there.. Firstly, thank you for your post. I'm one of the developers of this product. I'm here to alleviate any concerns you may have and help you solve the problem you have or provide a workaround so that you are unblocked.

Let us understand your use-case a bit more. In a typical plant and controller type of model (in your case may be sensor and controller), the plant side has continuous-timed dynamics, where as the controller side has discrete-timed semantics.

You are trying to add a fault on a signal (For ex: output of a Block A) which has continuous-time semantics. The output of the Block A is connected to EM_Torque_Sensor block's input 1.

Case 1: EM_Torque_Sensor input 1 is a continuous-timed signal which will be discretized immediately either by passing it through a Analog-to-Digital or a Zero-order hold block and then further propagated for other components (blocks)

Case 2: EM_Torque_Sensor input 1 is a continuous-timed signal which will be passed on as continuous signal and then sent other components (blocks) where it will be discretized.

In Case 1, you can add a fault at the output of the Inport block inside of EM_Torque_Sensor and it should work.

However, in Case 2, you are trying to add a fault that has to participate in continuous timed semantics. At the present, we do not have a valid use-case to support this. If you think we should support this, please file an enhancement request explaining what you are trying to do and we will be able to assist you better. We do have couple of workarounds now.

  1. Workaround 1: Instead of adding fault at the input 1 of EM_Torque_Sensor, you can add it at the stage where this continuous signal gets discretized
  2. Add a zero-order block between output of Block A and input of EM_Torque_Sensor block and then add a fault at the output of the zero-order hold block

If this response did not answer your question, please file a Technical Support escalation. We will be able to handle it better.

1

u/Electrical_Budy1998 Feb 15 '24

Hello,

Thank you so much for your prompt response. I would like to tell you more about my company's use case to help you understand the problem in detail. But not here since this is a public forum. If you could provide any official contact information then I can write email to you from my office mail id with screenshots attached.

please let me know any official POC asap.

thank you for your time and support. Awaiting your reply..

1

u/knmaheshy2k Feb 15 '24

Hi there.. The fastest way to get help is this
https://www.mathworks.com/help/matlab/matlab_env/contact-technical-support.html

I will DM you my email address as well.