喜歡這套資料就充值下載吧。。。資源目錄里展示的都可在線預覽哦。。。下載后都有,,請放心下載,,文件全都包含在內(nèi),,【有疑問咨詢QQ:1064457796 或 1304139763】
===========================================喜歡這套資料就充值下載吧。。。資源目錄里展示的都可在線預覽哦。。。下載后都有,,請放心下載,,文件全都包含在內(nèi),,【有疑問咨詢QQ:1064457796 或 1304139763】
===========================================
外文資料翻譯
In the article has analyzed the elevator loadcharacteristics, elaborated uses the trapezoid acceleration curve theelevator ideal velocity curve, unifies the frequency changer and thePLC performance, elaborated the elevator control system constitutionand the operational factor. Elaborated the elevator speed curveproduces the method, has induced the characteristic which designs byPLC constitution control system software.
Key word: Load characteristics ideal velocity curve control systemsoftware design
文中分析了電梯的負載特性,闡述了采用梯形加速曲線的電梯理想速度曲線,結(jié)合變頻器和PLC的性能,論述了電梯控制系統(tǒng)的構(gòu)成和工作特性。闡述了電梯速度曲線產(chǎn)生的方法,歸納了由PLC構(gòu)成的控制系統(tǒng)軟件設計的特點。
關(guān)鍵詞:負載特性 理想速度曲線 控制系統(tǒng) 軟件設計
1.??? Outline
Along with the urban construction unceasing development, thehigh-rise construction unceasingly increases, the elevator has thewidespread application in the national economy and the life. Theelevator took in the high-rise construction the vertical movementtransportation vehicle already and people's daily life is inseparable.In fact the elevator is according to exterior movement and so oncalling signal as well as own control rule, but calls is stochastic,the elevator is a person machine interactive control system in fact,purely is cannot satisfy the control request with the sequentialcontrol or the logical control, Therefore, the elevator control system uses the stochastic logical waycontrol. At present the elevator control generally has selected twomethods, one is uses the microcomputer to take the signal controlunit, completes the elevator signal gathering, the running status andthe function hypothesis, realizes the elevator automatic dispatch andthe collection chooses the movement function, drives the control tocomplete by the frequency changer; The second control mode (PLC)substitutes for the microcomputer realization signal collection withthe programmable controller to choose the control. Said from the control mode and the performance, these two methodscertainly not too big difference. The domestic factory mostly choosesthe second way, its reason lies in the production scale slightly, owndesign and the manufacture microcomputer control device cost ishigher; But PLC reliability high, programming convenience nimble, theantijamming ability strong, the movement stable is reliable and so onthe characteristic, therefore the present elevator control systemwidely uses the programmable controller to realize.
1.概述
隨著城市建設的不斷發(fā)展,高層建筑不斷增多,電梯在國民經(jīng)濟和生活中有著廣泛的應用。電梯作為高層建筑中垂直運行的交通工具已與人們的日常生活密不可分。實際上電梯是根據(jù)外部呼叫信號以及自身控制規(guī)律等運行的,而呼叫是隨機的,電梯實際上是一個人機交互式的控制系統(tǒng),單純用順序控制或邏輯控制是不能滿足控制要求的,因此,電梯控制系統(tǒng)采用隨機邏輯方式控制。目前電梯的控制普遍采用了兩種方式,一是采用微機作為信號控制單元,完成電梯信號的采集、運行狀態(tài)和功能的設定,實現(xiàn)電梯的自動調(diào)度和集選運行功能,拖動控制則由變頻器來完成;第二種控制方式用可編程控制器(PLC)取代微機實現(xiàn)信號集選控制。從控制方式和性能上來說,這兩種方法并沒有太大的區(qū)別。國內(nèi)廠家大多選擇第二種方式,其原因在于生產(chǎn)規(guī)模較小,自己設計和制造微機控制裝置成本較高;而PLC可靠性高,程序設計方便靈活,抗干擾能力強、運行穩(wěn)定可靠等特點,所以現(xiàn)在的電梯控制系統(tǒng)廣泛采用可編程控制器來實現(xiàn)。
2.??? Elevator ideal performance diagram
Indicated according to the massive research and the experiment, theperson may accept the maximum acceleration is am <= 1.5m/s2,acceleration rate of change rho m <= the 3m/s3, elevator idealperformance diagram may divide according to the acceleration is thetriangle, the trapezoid and the sine profile, As a result of sine profile acceleration curve realization moredifficult, but the triangle curve maximum acceleration and is startingand applies the brake the section turning point acceleration rate ofchange to be bigger than the trapezoidal curve, namely + rho m jumpsto - rho m or jumps from - rho m to + rho the m acceleration rate ofchange, therefore very little uses, because the trapezoidal curve iseasy to realize and has the good acceleration rate of change frequenttarget, therefore is widely used, uses the trapezoidal accelerationcurve elevator ideal performance diagram like chart 1 to show:
2.電梯理想運行曲線
根據(jù)大量的研究和實驗表明,人可接受的最大加速度為am≤1.5m/s2, 加速度變化率ρm≤3m/s3,電梯的理想運行曲線按加速度可劃分為三角形、梯形和正弦波形,由于正弦波形加速度曲線實現(xiàn)較為困難,而三角形曲線最大加速度和在啟動及制動段的轉(zhuǎn)折點處的加速度變化率均大于梯形曲線,即+ρm跳變到-ρm或由-ρm跳變到+ρm的加速度變化率,故很少采用,因梯形曲線容易實現(xiàn)并且有良好加速度變化率頻繁指標,故被廣泛采用。
The intelligent frequency changer is for the elevator special-purposefrequency changer request and so on elevator nimble velocitymodulation, control and high accuracy even level which but speciallydesigns, may use for parts the general three-phase asynchronous motor,and has function and so on intellectualized software, standardconnection, menu prompt, input elevator curve and other essentialparameter. It has the debugging convenience quickly, moreover can automaticallyrealize the single multilayered function, and has the automaticoptimization deceleration curve the function, is composed the velocitymodulation system crawling time by it few, the even level distance isshort, no matter is the double winding electric motor, or electric motor suitable, its highest design speed may reach 4m/s, itsunique computer monitoring software, may choose the serial interfacerealization input/output signal the non- electronic contact control. The frequency changer constitutes elevator system, when the frequencychanger receives the controller to send out shouts the ladderdirection signal, the frequency changer basis hypothesis speed and theacceleration value, the starting motor, after achieved the maximumspeed, the uniform speed moves, when arrives the goal leveldecelerates, the controller sends out shuts off the high velocitysignal, reduces the speed which the frequency changer establishes themaximum speed to reduce to the crawling speed, In decelerates in the movement process, the frequency changer can theautomatic computation decelerate to the even level spot betweendistance, and calculates the optimized curve, thus can according tothe optimized curve movement, cause the low speed crawling time toreduce to 0.3s, the frequency changer through adjusts leveling thespeed in the elevator even level process or applies the brake thepitch to adjust leveling the precision. Namely when the elevator stops too early, the frequency changerincreases the low speed value or the reduction applies the brake thepitch value, otherwise reduces the low speed value or increasesapplies the brake the pitch value, when the elevator to leaves evenlevel position 4 - 10cm, has the even level switch automaticseparation low speed signal, the system according to the optimizedcurve realization high accuracy even level, thus achieved the evenlevel accurate is reliable.
智能變頻器是為電梯的靈活調(diào)速、控制及高精度平層等要求而專門設計的電梯專用變頻器,可配用通用的三相異步電動機,并具有智能化軟件、標準接口、菜單提示、輸入電梯曲線及其它關(guān)鍵參數(shù)等功能。其具有調(diào)試方便快捷,而且能自動實現(xiàn)單多層功能,并具有自動優(yōu)化減速曲線的功能,由其組成的調(diào)速系統(tǒng)的爬行時間少,平層距離短,不論是雙繞組電動機,還是單繞組電動機均可適用,其最高設計速度可達4m/s,其獨特的電腦監(jiān)控軟件,可選擇串行接口實現(xiàn)輸入/輸出信號的無觸點控制。
變頻器構(gòu)成的電梯系統(tǒng),當變頻器接收到控制器發(fā)出的呼梯方向信號,變頻器依據(jù)設定的速度及加速度值,啟動電動機,達到最大速度后,勻速運行,在到達目的層的減速點時,控制器發(fā)出切斷高速度信號,變頻器以設定的減速度將最大速度減至爬行速度,在減速運行過程中,變頻器的能夠自動計算出減速點到平層點之間的距離,并計算出優(yōu)化曲線,從而能夠按優(yōu)化曲線運行,使低速爬行時間縮短至0.3s,在電梯的平層過程中變頻器通過調(diào)整平層速度或制動斜坡來調(diào)整平層精度。即當電梯停得太早時,變頻器增大低速度值或減少制動斜坡值,反之則減少低速度值或增大制動斜坡值,在電梯到距平層位置4—10cm時,有平層開關(guān)自動斷開低速信號,系統(tǒng)按優(yōu)化曲線實現(xiàn)高精度的平層,從而達到平層的準確可靠。
3.??? Elevator speed curve
Elevator movement comfortableness is decided in its movementprocess acceleration a and the acceleration rate of change p size, theoversized acceleration or the acceleration rate of change can createpassenger's ill feeling. At the same time, for guaranteed the elevatorthe operating efficiency, a, the p value not suitable excessively issmall. Can guarantee a, the p best value elevator performance diagramis called the elevator the ideal performance diagram. The elevatormovement ideal curve should be the parabola - straight linecomprehensive velocity curve, namely elevator Canada, reduces theprocess constitutes by the parabola and the straight line. Theelevator assigns the curve is whether ideal, direct influence actualperformance diagram.
3.電梯速度曲線
電梯運行的舒適性取決于其運行過程中加速度a和加速度變化率p的大小,過大的加速度或加速度變化率會造成乘客的不適感。同時,為保證電梯的運行效率,a、p的值不宜過小。能保證a、p最佳取值的電梯運行曲線稱為電梯的理想運行曲線。電梯運行的理想曲線應是拋物線-直線綜合速度曲線,即電梯的加、減過程由拋物線和直線構(gòu)成。電梯給定曲線是否理想,直接影響實際的運行曲線。
3.1??? velocity curves have the method
Uses FX2-64MR PLC, and a consideration input output requestincreased FX-8EYT, FX-16EYR, the FX-8EYR three expansions modules andthe FX2-40AW twisted pair line correspondence adapter, FX2-40AW usesin the system serial communication. Using PLC the expansion functionmodule D/A module realization speed ideal curve output, whenbeforehand the digitized ideal velocity curve stores the PLC register,the procedure movement, through looks up the table way to read in D/A,transforms the simulation quantity after D/A the speed ideal curveoutput.
3.1速度曲線產(chǎn)生方法
采用的FX2-64MR PLC,并考慮輸入輸出點要求增加了FX-8EYT、FX-16EYR、FX-8EYR三個擴展模塊和FX2-40AW雙絞線通信適配器,F(xiàn)X2-40AW用于系統(tǒng)串行通信。利用PLC擴展功能模塊D/A模塊實現(xiàn)速度理想曲線輸出,事先將數(shù)字化的理想速度曲線存入PLC寄存器,程序運行時,通過查表方式寫入D/A,由D/A轉(zhuǎn)換成模擬量后將速度理想曲線輸出。
3.2 Acceleration assign the curve the production
8 D/A outputs 0 ~ 5V/0 ~ 10V, the corresponding numerical valueis 16 enters system several 00 ~ FF, altogether 255 levels. Ifelevator rise time between 2.5 ~ 3 seconds. According to theconservative value computation, in the elevator acceleration processeach time Zha Biao time-gap not suitably surpasses 10ms.
3.2加速給定曲線的產(chǎn)生
8位D/A輸出0~5V/0~10V,對應數(shù)字值為16進制數(shù)00~FF,共255級。若電梯加速時間在2.5~3秒之間。按保守值計算,電梯加速過程中每次查表的時間間隔不宜超過10ms。
As a result of elevator logic control section procedure biggest, butthe PLC movement uses the cyclical scanning mechanism, thus usuallyuses looks up the table method, Zha Biao instruction time-gapexcessively is each time long, cannot satisfiedly assign the curve theprecision request. In the PLC movement process, its CPU with variousequipment between exchange of information, user program execution,signal gathering, control quantity operation and so on output all isdefers to the fixed order to circulate the scanning way to carry on,each circulation all must carry on the inquiry, the judgement and theoperation to all functions. This kind of order and the form capableperson are not the change. The usual scanning cycle, is basic mustcomplete six steps the work, including movement surveillance, andprogramming exchange information, and digital processor exchangeinformation, and communication processor exchange information,execution user program and input output connection service and so on.In a cycle, CPU only carries out to the entire user program. This kindof mechanism has its convenient one side, but timeliness is bad. Theexcessively long scanning time, directly affects the system to thesignal response effect, in under the guarantee control functionpremise, maximum limit reduces CPU the cyclical scanning time is avery complex question. Generally only can short adopt the method fromthe user program execution time. The elevator logic control sectionprocedure scanning time has surpassed 10ms, although has adopted somereduced procedure scanning time means, but still will be unable toscan the time to fall to 10ms below. At the same time, applies thebrake the section curve to use according to is away from theprinciple, each section of distances arrive the response time notsuitably surpasses 10ms. In order to satisfy the system the timelyrequest, in the velocity curve production way, uses the severancemethod, thus effectively has overcome the PLC scanning mechanismlimit.
由于電梯邏輯控制部分程序最大,而PLC運行采用周期掃描機制,因而采用通常的查表方法,每次查表的指令時間間隔過長,不能滿足給定曲線的精度要求。在PLC運行過程中,其CPU與各設備之間的信息交換、用戶程序的執(zhí)行、信號采集、控制量的輸出等操作都是按照固定的順序以循環(huán)掃描的方式進行的,每個循環(huán)都要對所有功能進行查詢、判斷和操作。這種順序和格式不能人為改變。通常一個掃描周期,基本要完成六個步驟的工作,包括運行監(jiān)視、與編程器交換信息、與數(shù)字處理器交換信息、與通訊處理器交換信息、執(zhí)行用戶程序和輸入輸出接口服務等。在一個周期內(nèi),CPU對整個用戶程序只執(zhí)行一遍。這種機制有其方便的一面,但實時性差。過長的掃描時間,直接影響系統(tǒng)對信號響應的效果,在保證控制功能的前提下,最大限度地縮短CPU的周期掃描時間是一個很復雜的問題。一般只能從用戶程序執(zhí)行時間最短采取方法。電梯邏輯控制部分的程序掃描時間已超過10ms,盡管采取了一些減少程序掃描時間的辦法,但仍無法將掃描時間降到10ms以下。同時,制動段曲線采用按距離原則,每段距離到的響應時間也不宜超過10ms。為滿足系統(tǒng)的實時性要求,在速度曲線的產(chǎn)生方式中,采用中斷方法,從而有效地克服了PLC掃描機制的限制。
The starting acceleration movement by decides the cycle interruptservice isr to complete. This kind of severance cannot carry on theswitch by the procedure, once establishes, continuously presses thehypothesis time-gap circulation severance, therefore, the startingmovement condition must put in the interrupt service isr, when doesnot satisfy the movement condition, the severance namely returns.
起動加速運行由定周期中斷服務程序完成。這種中斷不能由程序進行開關(guān),一旦設定,就一直按設定時間間隔循環(huán)中斷,所以,起動運行條件需放在中斷服務程序中,在不滿足運行條件時,中斷即返回。
3.2??? Decelerates applies the brake the curve production
In order to guarantee applies the brake process completing,must carry on in the master routine applies the brake the condition tojudge and to decelerate a determination. In decelerates before adetermination, the elevator continuously is in the acceleration or thesteady fast movement process. The acceleration process completes bythe fixed cyclical severance, accelerates after the correspondingpattern maximum value, the acceleration procedure movement conditionno longer satisfies, after each time severs, no longer carries out theacceleration procedure, directly returns from the severance. Theelevator corresponds the pattern the maximum value movement,decelerates in this pattern to after, has the high-speed countingseverance, the execution decelerates the service routine. Revises thecounter in this interrupt service isr to suppose the definite valuethe condition, guaranteed the next time will sever the execution. In the PLC internal register, deceleration curve table value from big to small , each time severs all carries out time "theindicator needle to add 1" the operation, then the next severance willlook up the table number is smaller than this severance to look up the table numbers. Thegate area peaceful level area judgement produces by exterior signal,guarantees the moderating process the reliability.
3.3減速制動曲線的產(chǎn)生
為保證制動過程的完成,需在主程序中進行制動條件判斷和減速點確定。在減速點確定之前,電梯一直處于加速或穩(wěn)速運行過程中。加速過程由固定周期中斷完成,加速到對應模式的最大值之后,加速程序運行條件不再滿足,每次中斷后,不再執(zhí)行加速程序,直接從中斷返回。電梯以對應模式的最大值運行,在該模式減速點到后,產(chǎn)生高速計數(shù)中斷,執(zhí)行減速服務程序。在該中斷服務程序中修改計數(shù)器設定值的條件,保證下次中斷執(zhí)行。
在PLC的內(nèi)部寄存器中,減速曲線表的數(shù)值由大到小排列,每次中斷都執(zhí)行一次“表指針加1”操作,則下一次中斷的查表值將小于本次中斷的查表值。門區(qū)和平層區(qū)的判斷均由外部信號給出,以保證減速過程的可靠性。
4. Elevator control system
4.1 Elevators control system characteristic
Is relates the elevator movement comfortable feeling target in theelevator performance diagram start section the key link, but thecomfortable feeling with the acceleration direct correlation,according to controls the theory, must cause some quantity accordingto prearrange the rule change to have to carry on the positivegoverning to it, said regarding the elevator control system, mustcause the acceleration to have to use the acceleration feedbackaccording to the ideal curve change, according to electric motormoment of force equation: M - MZ= Delta M=J (dn/dt), obviously theacceleration rate of change had reflected the system dynamic extensionis apart from the change, the control acceleration is apart from DeltaM=M - MZ on the control system dynamic extension. Therefore uses theacceleration in this section the timing control principle, when thestart ascent portion speed achieved when stable state value 90%,systematically will cut the speed control from the accelerationcontrol, because in the steady fast section, the speed will besmaller for the permanent value control undulation, the accelerationchange will not be big, also will use the speed closed-loop controlto be allowed to cause the stable state speed hold certain precision,will be applies the brake the section precise even level to create thecondition. Uses the PI regulator control in the system speed ascentportion and steady fast Duan Suidu, but two section of PI parameter isdifferent, enhances the system the dynamic response target.
4.電梯控制系統(tǒng)
4.1電梯控制系統(tǒng)特性
在電梯運行曲線中的啟動段是關(guān)系到電梯運行舒適感指標的主要環(huán)節(jié),而舒適感又與加速度直接相關(guān),根據(jù)控制理論,要使某個量按預定規(guī)律變化必須對其進行直接控制,對于電梯控制系統(tǒng)來說,要使加速度按理想曲線變化就必須采用加速度反饋,根據(jù)電動機的力矩方程式:M—MZ=ΔM=J(dn/dt),可見加速度的變化率反映了系統(tǒng)動態(tài)轉(zhuǎn)距的變化,控制加速度就控制系統(tǒng)的動態(tài)轉(zhuǎn)距ΔM=M—MZ。故在此段采用加速度的時間控制原則,當啟動上升段速度達到穩(wěn)態(tài)值的90%時,將系統(tǒng)由加速度控制切換到速度控制,因為在穩(wěn)速段,速度為恒值控制波動較小,加速度變化不大,且采用速度閉環(huán)控制可以使穩(wěn)態(tài)速度保持一定的精度,為制動段的精確平層創(chuàng)造條件。在系統(tǒng)的速度上升段和穩(wěn)速段雖都采用PI調(diào)節(jié)器控制,但兩段的PI參數(shù)是不同的,以提高系統(tǒng)的動態(tài)響應指標。
Applies the brake the section in the system, namely must to reduce thespeed to carry on the essential control, guarantees the comfortablefeeling, also must strictly controls according to the elevatormovement speed and the distance relations, guarantees the even levelthe precision. In system’s rotational speed reduces to 120r/min in front of, in orderto enable two to obtain the proper attention to both, adopts by theacceleration to the timing control primarily, simultaneously actsaccording to on each as soon as the stopping distance the actualrotational speed and the theory rotational speed deviation revises theacceleration to assign the curve the method. For example in is awayfrom the even level spot some as soon as to be away from L place, thespeed should reduce to Vm/s, but the actual rotational speed is highis V ' m/s, then explained adds the system turns is apart frominsufficiently, after therefore calculates the here to assign reducesspeed value -ag, causes it to add on a negative deviation againepsilon, even if the here reduces the speed given value to revise for- (ag+ epsilon) causes to assign reduces the speed and the true speednegative deviation enlarges, thus enlarged the system to turn thedistance, caused the speed very quickly to fall to the standard value,when electric motor’s rotational speed reduces
to 120r/min after, this time thetheater box above the level only had several centimeters, The elevatorrunning rate is very low, for did not prevent phenomenon appearancewhich stops to the even level area, enables the elevator comparativelyquickly to enter the even level area, uses the proportional control inthis section, and uses the time optimization control, guaranteed theelevator accurately promptly enters the even level area, achieves theaccurate reliable even level.
在系統(tǒng)的制動段,即要對減速度進行必要的控制,以保證舒適感,又要嚴格地按電梯運行的速度和距離的關(guān)系來控制,以保證平層的精度。在系統(tǒng)的轉(zhuǎn)速降至120r/min之前,為了使兩者得到兼顧,采取以加速度對時間控制為主,同時根據(jù)在每一制動距離上實際轉(zhuǎn)速與理論轉(zhuǎn)速的偏差來修正加速度給定曲線的方法。例如在距離平層點的某一距離L處,速度應降為 Vm/s,而實際轉(zhuǎn)速高為V′m/s,則說明所加的制動轉(zhuǎn)距不夠,因此計算出此處的給定減速度值-ag后,使其再加上一個負偏差ε,即使此處的減速度給定值修正為-(ag+ε)使給定減速度與實際速度負偏差加大,從而加大了制動轉(zhuǎn)距,使速度很快降到標準值,當電動機的轉(zhuǎn)速降到120r/min 以后,此時轎廂距平層只有十幾厘米,電梯的運行速度很低,為防止未到平層區(qū)就停車的現(xiàn)象出現(xiàn),以使電梯能較快地進入平層區(qū),在此段采用比例調(diào)節(jié),并采用時間優(yōu)化控制,以保證電梯準確及時地進入平層區(qū),以達到準確可靠平層。
4.2 elevators controls constitution
Because the elevator movement is according to the floor and the theater box calling signal, the travelling schedule signalcarries on the control, but the floor and the theater box call isstochastic, therefore, the systems control uses the stochastic logicalcontrol. Namely in realizes in the elevator basic control requestfoundation by the smooth logic control, according to stochastic inputsignal, as well as elevator corresponding condition at the rightmoment control elevator movement. Moreover, the theater boxposition is determined by the pulse encoder pulse number that, anddelivers PLC the counter to carry on the control. At the same time,each building establishes to approach the switch to use in to examinethe system the floor signal. In order to be advantageous for the observation, is at the floor tothe elevator movement direction as well as the elevator to carry onthe demonstration, uses LED and the photo tube demonstrated, but tothe floor and the theater box calling signal to the indicating lampdemonstrated (on switch has indicating lamp).
4.2電梯控制構(gòu)成
由于電梯的運行是根據(jù)樓層和轎廂的呼叫信號、行程信號進行控制,而樓層和轎廂的呼叫是隨機的,因此,系統(tǒng)控制采用隨機邏輯控制。即在以順序邏輯控制實現(xiàn)電梯的基本控制要求的基礎(chǔ)上,根據(jù)隨機的輸入信號,以及電梯的相應狀態(tài)適時的控制電梯的運行。另外,轎廂的位置是由脈沖編碼器的脈沖數(shù)確定,并送PLC的計數(shù)器來進行控制。同時,每層樓設置一個接近開關(guān)用于檢測系統(tǒng)的樓層信號。
In order to enhance the elevator the operating efficiency peacefullevel precision, the system requests PLC to be able to theater boxCanada, to decelerate as well as to apply the brake to carry on theeffective control. Realizes according to the theater box physicallocation as well as the exchange velocity modulation system controlalgorithm. For the elevator movement security, the system shouldestablish the reliable fail safe and the corresponding demonstration.Uses the PLC realization the elevator control system to constitute byfollowing several main parts.
為便于觀察,對電梯的運行方向以及電梯所在的樓層進行顯示,采用LED和發(fā)光管顯示,而對樓層和轎廂的呼叫信號以指示燈顯示(開關(guān)上帶有指示燈)。
為了提高電梯的運行效率和平層的精度,系統(tǒng)要求PLC能對轎廂的加、減速以及制動進行有效的控制。根據(jù)轎廂的實際位置以及交流調(diào)速系統(tǒng)的控制算法