cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

RELAY function

ptc-286210
7-Bedrock

RELAY function

Hello colleagues, how to realize in Mathcad block RELAY from Simulink:

"The Relay block allows its output to switch between two specified values. When the relay is on, it remains on until the input drops below the value of the Switch off point parameter. When the relay is off, it remains off until the input exceeds the value of the Switch on point parameter"



http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/index.html?/access/helpdesk/help/toolbox/simulink/&http://www.mathworks.com/access/helpdesk/help/helpdesk.html

18 REPLIES 18
IRstuff
12-Amethyst
(To:ptc-286210)

On 7/24/2009 9:32:10 AM, rosenm wrote:
>Hello colleagues, how to
>realize in Mathcad block RELAY
>from Simulink:
"The Relay
>block allows its output to
>switch between two specified
>values. When the relay is on,
>it remains on until the input
>drops below the value of the
>Switch off point parameter.
>When the relay is off, it
>remains off until the input
>exceeds the value of the
>Switch on point
>parameter"

http://www.mathwor
>ks.com/access/helpdesk/help/to
>olbox/simulink/index.html?/acc
>ess/helpdesk/help/toolbox/simu
>link/&http://www.mathworks.com
>/access/helpdesk/help/helpdesk
>.html


Wouldn't an IF statement work?

if(in>=threshold,"on","off")

TTFN,
Eden

No, sorry, it is not so simple:)

This block represents hysteresis, it has memory

On 7/24/2009 10:31:06 AM, rosenm wrote:
>No, sorry, it is not so simple:)
______________________

If not so simple, then why spare time.
If you can't explain, make a picture.

jmG



>Hello colleagues, how to realize in Mathcad block RELAY from Simulink:<<br> ___________________________

Why not a bit of diagram ?

jmG

Mathcad doesn't do temporal simulation unless it is
as the solution to an ODE.

Tom Gutman did a function which simulated hysteresis
a year or so ago. It worked pretty well.

Philip Oakley

I think there is a difference.

It looks like you are trying to simulate a memristor. I was thinking about that too, a few weeks ago, when I read an article about them.

I am sorry, I have not yet made up a worksheet to simulate one of these. Their real interest seems to be when they are made into large arrays which would have the ability to learn in a useful way. (some people think these are a good analogue for biological nervous systems)

The property that these have is similar to a flip/flop, in that when a (voltage, current or other parameter) exceeds a certain value, it goes over into a second state where the resistance is a high value. It retains that value reliably until the voltage is reversed (or reduced) to another set point. Then the resistance reverts to its original value. Many reversals can be made at the same set points and the same two resistance values (or nearly, in practice) can be replicated each time. (Rough description only, got second hand from various magazines)

Memristors have the potential to be useful in computing because their speed and reliability and building them into chips can be like a "flash" memory but on a larger scale.

However many times the resistance is measured, provided the switching voltage is not exceeded, it stays "Flipped".

Hysteresis can apply at any point on a continuous scale and may or might not be repeatable, depending on the history of the sample in question.

The nearest computing equivalent would be the small ferrite rings that formed the working memory of early computers (IBM 1130 for example) which had a small coil that magnetised them one way or the other to register a bit of data. As I remember these were apt to fail because of their delicate construction and were (part of) the reason for low computational speeds compared to modern machines.

Is a memristor what you had in mind ?

TOM

You can implement something like that easily as a scripted component.

But it's not as useful as you might expect, within the Mathcad context. Mathcad it great for doing calculations, with models as algebraic and differential equations. It is not particularly good at doing event driven simulations, which is where such a block might be used.
__________________
� � � � Tom Gutman

Here is a little routine I have used to emulate the hysteresis in a temperature switch - perhaps you could adapt it to your application. (It works only for discrete valued variables, not continuous i.e. analytical functions).
Jim S.

Memristors are 'odd' in that they aren't even
hysteresis devices.

If I remember rightly there resistance is
proportional to the integral of current that has
passed through... weird...


Philip Oakley

My apologies if this is simply restating the obvious. I thought to divorce the low level relay function from the rest of the problem.

Rich
http://www.downeastengineering.com/

"The Relay block allows its output to switch between two specified values. When the relay is on, it remains on until the input drops below the value of the Switch off point parameter. When the relay is off, it remains off until the input exceeds the value of the Switch on point parameter"
_______________________________

Is there a technical definition like: latching relay ?

jmG

On 7/24/2009 9:32:10 AM, rosenm wrote:
Hello colleagues, how to realize in Mathcad block RELAY from Simulink:

"The Relay block allows its output to switch between two specified values. When the relay is on, it remains on until the input drops below the value of the Switch off point parameter. When the relay is off, it remains off until the input exceeds the value of the Switch on point parameter"
______________________________

"The Relay block allows its output to switch between two specified values"

Does not go with:

"When the relay is on, it remains on until the input drops below the value of the Switch off point parameter. When the relay is off, it remains off until the input exceeds the value of the Switch on point parameter".

Just make a picture of what you want before getting lost in conjectures.



jmG





Thanks to everybody for valuable information. I need to create a thermal model of a house with thermostat-the temperature must lie in the predefined limits, there is a heating and cooling of the house, please see the picture. In most simulation programs this model is created by a RELAY function.

There is a long thread thoroughly discussing (with various solutions) hysteresis in general and a thermostatic temperature control specifically at http://collab.mathsoft.com/read?103012,63e#103012 .
__________________
� � � � Tom Gutman

Ok, thanks

On 7/25/2009 3:57:01 AM, rosenm wrote:
>Thanks to everybody for valuable information. I need to create a thermal model of a house with thermostat-the temperature must lie in the predefined limits, there is a heating and cooling of the house, please see the picture. In most simulation programs this model is created by a RELAY function. <<br> __________________________

Your picture is not correct as there is no dynamic evolution over the time. Just a straight simple "sate auctioneer logic". Mathcad can in fact perform an immense amount of "Programmable Logic". If you are in that stuff, better get dedicated tools.



jmG

jmG, the picture is only for illustrational purposes.

On 7/25/2009 12:30:25 PM, rosenm wrote:
>jmG, the picture is only for
>illustrational purposes.
_________________________

OK, but the picture illustrates neither the Simulink RELAY you passed first, nor your 2nd attempt about a bidirectional house thermostat which bidirectional switch you should plug in a Mathcad work sheet and return with whatever more wishes you might think of.

jmG



Announcements

Top Tags