Note: The design is implemented in Simulink.
Suppose I have a system wherein I am computing the sum of errors per discrete time interval. Now, I only want to consider positive errors to be summed up every time. How can I reject negative errors?
Here are some of my failed solutions just so you know:
- I tried to connect the error output to an "if block" in the ports and subsytem. The output of the "if block" is connected to the discrete time integrator to sum up the positive errors then to scope
**This fails because the "if block" limits its output port connection to be not a subsystem.
- I tried to connect the error output to the relational operator. When the output is less than 0, then the output of the relational operator is 1 otherwise 0. The output of the relational operator is connected to a gain of (50), since luckily, the error is either 50 or -50. Then the gain is connected to discrete time integrator then to scope.
**This also fails since the readings in the scope only lies between 0 to 1, which is entirely impossible since it should be a multiple of 50.