[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] hysterese?



Michael Schmidt wrote:
On Tue, 18 Jul 2006 10:56:20 +0200, Hans Schou <sslug@sslug> wrote:


Der skulle ikke være nogen der kender en algoritme der kan simulere
hysterese?


STATE=0
VOLT=0

while true ; do
        echo "STATE:$STATE VOLT:$VOLT"
        if [ $STATE -eq 0 ] ; then
                if [ $VOLT -ge 6 ]; then
                        STATE=1
                fi
        else
                if [ $VOLT -le 4 ]; then
                        STATE=0
                fi
        fi
        let VOLT=$VOLT+1
done

Du skal bare huske på hvad din STATE er på den anden side.

Hvis din STATE er 0 og du får en VOLT der er højere end 6, så skifter du
STATE til 1.

Hvis STATE er 1 og den nye VOLT er under 4, så skift til 0.


Ovenstående kode er for en Schmitt-trigger (så vidt jeg kan se)
Lige præcis. Og det er jeg ikke så glad for at benytte en Schimtt-trigger. Det man kan sige er at den har kun en 1-bit
hukummelse.
Vi må nok be om en uddybning af hvilken type hysterese der skal modelleres.
Der er ikke tale om nogen bestemt form jeg skal bruge det til en filter funktion. Så jeg går ikke så højt op i hvilken type hysterese, det er mere princippet. Som Hans påpeger er det noget med at gemme en Tilstand
og så beregne den nye værdi.


Jeg tænkte først på magnetisk flux vs. feltstyrke, men kunne ikke huske formlerne, så derfor kan jeg ikke umiddelbart biddrage.
Hysterese betyder jo blot forsinket reaktion (uden indsvingning).


PEA



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2006-08-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *