# How to make a boolean function for describing a switching system?

• Mar 28th 2011, 12:33 PM
liptak
How to make a boolean function for describing a switching system?
Hey,

how to make the output of this function $res=|F_{real}(s)-F_{nominal}(s)|$ boolean to describe these conditions?

$switch(s)=1 \Leftrightarrow |F_{real}(s)-F_{nominal}(s)| =0$
$switch(s)=0 \Leftrightarrow |F_{real}(s)-F_{nominal}(s)| \neq 0$

I need it for mathematical description of the switching system:

$F_{real}(s)=F_{real1}(s).switch(s) + F_{real2}(s).NOR(switch(s))$

I don't even know if I can mix it up this way.

( $F$ are closed-loop transfer functions.)

Thank you

Liptak
• Mar 29th 2011, 02:37 AM
emakarov
Why don't you define switch(s) as you said?
$\mathop{\mbox{switch}}(s)=
\begin{cases}
1, & |F_{real}(s)-F_{nominal}(s)| =0\\
0, & \mbox{otherwise}
\end{cases}$

I have an impression that there may be some issues with rounding (can one always distinguish whether a given real number that is a result of a measurement equals 0?), but I don't know anything about your problem.

Also, what is NOR(x)? It can't be the negation of OR because the latter takes two arguments. Is it just negation, i.e., 1 - x?
• Mar 29th 2011, 10:55 AM
liptak

Quote:

Originally Posted by emakarov
Why don't you define switch(s) as you said?
$\mathop{\mbox{switch}}(s)=
\begin{cases}
1, & |F_{real}(s)-F_{nominal}(s)| =0\\
0, & \mbox{otherwise}
\end{cases}$

I was just wondering if there is any form I can describe it in some kind of discrete function.

Quote:

I have an impression that there may be some issues with rounding (can one always distinguish whether a given real number that is a result of a measurement equals 0?), but I don't know anything about your problem.
Thank you for your concern, but it's okay... and it's no problem to change the switch(s) condition.

Quote:

Also, what is NOR(x)? It can't be the negation of OR because the latter takes two arguments. Is it just negation, i.e., 1 - x?
Oops, yeah, you're right, I meant negation. (Doh)

Ok, thank you, I'm gonna describe it your way:

$\mathop{\mbox{switch}}(s)=
\begin{cases}
1, & |F_{real}(s)-F_{nominal}(s)| =0\\
0, & \mbox{otherwise}
\end{cases}$

$F_{real}(s)=F_{real1}(s).switch(s) + F_{real2}(s).(\neg switch(s))$
• Mar 29th 2011, 12:28 PM
liptak
And how to make the switch for more than 2 controllers? For example, consider 4 controllers and this switching condition:

$\mathop{\mbox{switch}}(s)=
\begin{cases}
1, & 0 2, & 5 \leq x<10\\
3, & 10 \leq x<15\\
4, & 15 \leq x<20
\end{cases}$

Simple negation of the switch function is not enough (Thinking)