[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?



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)
Vi må nok be om en uddybning af hvilken type hysterese der skal modelleres.
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).



-- Med venlig hilsen /Zmit/ RLU # 314205


 
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] *