Script to represent constant offset in scaling of data
Hello,
I have the attached simulink model which appears to be working as I need it to. The idea is to scale my SP input from engineering units to 0-100%, which is how the controller operates. That way, my P/I/D settings are directly identical to those entered into the controller, and I can align the matlab data with the controller data.
How would I enter this into a simple matlab script?
K = 100/(MaxEU-MinEU)
C = 100*MinEU/(MaxEU-MinEU)
It correctly multiplies the SP input value by the gain K, then after the gain block adds an offset which is completely independent of the SP input. I am struggling to deal with this ‘extra constant input’ in a matlab script.
My goal is to have a SISO transfer function between the step input and the output of the first summing junction, that I can easily integrate into the rest of the model with series/parallel connections.
What does not work (as far as I can tell) is EUSP = tf(100/(MaxEU-MinEU) – 100*MinEU/(MaxEU-MinEU))
since it applies a static gain to the step input, including the offset term. With or without the tf.
Perhaps I need to use sumblk and directly assign inputs/outputs? Still a little confused how to set that constant input for the offset term.Hello,
I have the attached simulink model which appears to be working as I need it to. The idea is to scale my SP input from engineering units to 0-100%, which is how the controller operates. That way, my P/I/D settings are directly identical to those entered into the controller, and I can align the matlab data with the controller data.
How would I enter this into a simple matlab script?
K = 100/(MaxEU-MinEU)
C = 100*MinEU/(MaxEU-MinEU)
It correctly multiplies the SP input value by the gain K, then after the gain block adds an offset which is completely independent of the SP input. I am struggling to deal with this ‘extra constant input’ in a matlab script.
My goal is to have a SISO transfer function between the step input and the output of the first summing junction, that I can easily integrate into the rest of the model with series/parallel connections.
What does not work (as far as I can tell) is EUSP = tf(100/(MaxEU-MinEU) – 100*MinEU/(MaxEU-MinEU))
since it applies a static gain to the step input, including the offset term. With or without the tf.
Perhaps I need to use sumblk and directly assign inputs/outputs? Still a little confused how to set that constant input for the offset term. Hello,
I have the attached simulink model which appears to be working as I need it to. The idea is to scale my SP input from engineering units to 0-100%, which is how the controller operates. That way, my P/I/D settings are directly identical to those entered into the controller, and I can align the matlab data with the controller data.
How would I enter this into a simple matlab script?
K = 100/(MaxEU-MinEU)
C = 100*MinEU/(MaxEU-MinEU)
It correctly multiplies the SP input value by the gain K, then after the gain block adds an offset which is completely independent of the SP input. I am struggling to deal with this ‘extra constant input’ in a matlab script.
My goal is to have a SISO transfer function between the step input and the output of the first summing junction, that I can easily integrate into the rest of the model with series/parallel connections.
What does not work (as far as I can tell) is EUSP = tf(100/(MaxEU-MinEU) – 100*MinEU/(MaxEU-MinEU))
since it applies a static gain to the step input, including the offset term. With or without the tf.
Perhaps I need to use sumblk and directly assign inputs/outputs? Still a little confused how to set that constant input for the offset term. engineering units, pid, offset MATLAB Answers — New Questions