reference will now be made in detail to embodiments of the invention , examples of which are illustrated in the accompanying drawings . wherever possible , the same reference numbers will be used throughout the drawings to refer to the same or like parts . referring to fig1 a fluid control system , for example , hydraulic circuit 100 , includes a valve assembly , for example , an independent metering valve arrangement 110 , a pump 112 , a tank 114 , and an actuator , for example , a hydraulic motor 116 . in this exemplary embodiment , the hydraulic motor may be a reversible , equal - displacement motor , having a first end chamber 118 and a second end chamber 120 . the pump 112 may comprise , for example , a variable - displacement , high pressure pump . the independent metering valve arrangement 110 includes a plurality of independently - operated , electronically - controlled metering valves 122 , 124 , 126 , 128 . the metering valves 122 , 124 , 126 , 128 control fluid flow between the pump 112 , the tank 114 , and the hydraulic motor 116 . the metering valves may be spool valves , poppet valves , or any other conventional type of metering valve that would be appropriate . the metering valves are referred to individually as a chamber - to - tank first end ( ctfe ) metering valve 122 , a pump - to - chamber first end ( pcfe ) metering valve 124 , a pump - to - chamber second end ( pcse ) metering valve 126 , and a chamber - to - tank second end ( ctse ) metering valve 128 . the independent metering valve arrangement 110 also includes an input port 130 , an output port 132 , a first end control port 134 , and a second end control port 136 . the hydraulic control system 100 also includes a first end pressure sensor 150 , a second end pressure sensor 152 , a controller 160 , and an operator input device 170 . the first and second end pressure sensors 150 , 152 are configured to communicate with the controller 160 . the input device 170 also communicates with the controller and allows an operator to control the hydraulic circuit 100 . for example , the input device 170 allows the operator to swing a load , for example , a pivotal operator cab with a work arm and / or a work implement . alternatively , the input device 170 may represent a source of input commands from , for example , a computer used to automatically control the hydraulic motor 116 without an operator . as shown in fig1 the controller 160 communicates electronically with the input device 170 , the metering valves 122 , 124 , 126 , 128 , and the pressure sensors 150 , 152 . the controller 160 may receive information from the input device 170 , for example , a swing direction command , as well as from the pressure sensors 150 , 152 . based on the commands from the input device 170 and the pressure sensors 150 , 152 , the controller may determine a desired operation for the hydraulic circuit 100 and an appropriate set of outputs 165 to the metering valves 122 , 124 , 126 , 128 . in one embodiment , the outputs 165 may represent currents to each of the metering valves 122 , 124 , 126 , 128 . [ 0018 ] fig2 is an exemplary operation 200 of the controller 160 in accordance with a first exemplary embodiment of the hydraulic circuit 100 . it should be appreciated that the numerical pressure error limits and ranges used throughout this exemplary operation 200 may differ depending on the machinery employing an algorithm according to the invention . referring to fig2 control commences with step 202 when the controller 160 receives a command from the input device 170 . in step 204 , the controller 160 determines a desired pressure to be applied to a working chamber and a flow limit of fluid to the working chamber , for example , by extrapolation from the graphs shown in fig3 and 4 . for example , a forward push on the input device 170 , for example , an operating lever , may be associated with the positive lever positions of fig3 and 4 and may cause the application of pressurized fluid to the first end chamber 118 of the hydraulic motor 116 to rotate the motor 116 in a clockwise direction . in this situation , the first end chamber 118 would be the working chamber . it should be appreciated that the opposite may be true for a rearward pull on the input device 170 . further , it should be appreciated that the effect of the directional movement of the input device 170 may be reversed as may be the association of the lever positions of fig3 and 4 . control then continues to step 206 where the controller 160 determines the pressure error at the working chamber , i . e ., first end chamber 118 or second end chamber 120 . the pressure error may be determined by subtracting the pressure sensed by the corresponding pressure sensor 150 , 152 at the working chamber from the desired pressure determined by the position of the input device 170 . then , in step 208 , the controller 160 determines whether the pressure error is greater than a first predetermined positive pressure error limit of , for example , 50 kpa ( 7 . 252 psi ). if the pressure error is greater than 50 kpa , control proceeds to step 210 . otherwise , control skips to step 230 . in step 210 , the controller 160 increases the fluid flow to the working chamber . the fluid flow to the working chamber may be controlled by operating the pump - to - chamber metering valve 124 , 126 associated with the working chamber . for example , if the first end chamber 118 is the working chamber , the pcfe metering valve 124 is controllably opened to increase the fluid flow to the first end chamber 118 . the amount that the pump - to - chamber metering valve 124 , 126 associated with the working chamber is opened may be determined by a predetermined algorithm or look - up table . gradual ramping of the fluid flow to the working chamber may provide a more controlled and / or smoother movement of the load . the ramping may be a linear or non - linear function . in addition , the chamber - to - tank metering valve associated with the non - working chamber may meter flow out of the non - working chamber as the pump - to - chamber metering valve associated with the working chamber controls fluid flow to the working chamber . metering of the chamber - to - tank valve associated with the non - working chamber may provide extra resistance to the working chamber and facilitate a quicker pressure buildup of fluid pressure at the working chamber . then , in step 212 , the controller 160 determines whether the increased fluid flow to the working chamber is greater than the flow limit determined by the position of the input device 170 . if the increased fluid flow is greater than the flow limit , control continues to step 214 . otherwise , control skips to step 216 . in step 214 , the controller 160 sets the increased fluid flow equal to the flow limit determined by the position of the input device 170 . control continues to step 216 . in step 216 , the controller 160 determines whether the pressure error is greater than a second predetermined positive pressure error limit of , for example , 5000 kpa ( 725 . 189 psi ). if the pressure error is greater than 5000 kpa , control continues to step 218 . otherwise , control goes to step 220 . in step 218 , the controller 160 sets the bleed flow associated with the working chamber equal to zero . the bleed flow may be controlled by the chamber - to - tank metering valve 122 , 128 associated with the working chamber . for example , if the first end chamber 118 is the working chamber , the bleed flow may be controlled by the ctfe metering valve 122 . in step 218 , the controller 160 may close the appropriate chamber - to - tank metering valve to achieve zero bleed flow . control then continues to step 240 , where control is returned to step 202 . in step 220 , when the controller 160 determines that the pressure error is not greater than 5000 kpa in step 216 , the controller 160 determines whether the bleed flow is equal to zero . if the bleed flow equals zero , control continues to step 222 . otherwise , control goes to step 224 . in step 222 , the controller 160 sets the bleed flow equal to a minimum bleed flow . the minimum bleed flow may be any predetermined amount , for example , 3 liters / min ( 1 pm ), 5 1 pm , 10 1 pm , etc . the minimum bleed flow may differ depending on the machinery employing an algorithm according to the invention . control then continues to step 240 , where control is returned to step 202 . in step 224 , when the controller 160 determines that the bleed flow is not equal to zero in step 220 , the controller reduces the amount of bleed flow . then , in step 226 , the controller 160 determines whether the reduced bleed flow is less than the minimum bleed flow . if the reduced bleed flow is less than the minimum bleed flow , control continues to step 228 . otherwise , control skips to step 240 , where control is returned to step 202 . in step 228 , when the controller 160 determines that the reduced bleed flow is less than the minimum bleed flow , the controller 160 sets the reduced bleed flow equal to the minimum bleed flow . control then continues to step 240 , where control is returned to step 202 . in step 230 , after determining that the pressure error is not greater than 50 kpa in step 208 , the controller 160 determines whether the pressure error is less than a first predetermined negative pressure error limit of , for example , − 50 kpa (− 7 . 252 psi ). if the pressure error is less than − 50 kpa , control continues to step 232 . otherwise , control goes to step 234 . in step 232 , the controller 160 decreases the fluid flow to the working chamber and increases the bleed flow . control then continues to step 240 , where control is returned to step 202 . in step 234 , after determining that the pressure error is not less than − 50 kpa , the controller maintains the present fluid flow to the working chamber and the present bleed flow . control then continues to step 240 , where control is returned to step 202 . referring to fig3 and 4 , the maximum and minimum desired pressures and the maximum flow limit may differ depending on the machinery employing an algorithm according to the invention . in addition , the relationship between desired pressure and lever position may be non - linear . furthermore , the relationship between flow limit and lever position may be linear or another nonlinear configuration . in use , the metering valves 122 , 128 control chamber - to - tank fluid flow while the metering valves 124 , 126 control pump - to - chamber fluid flow . conventional rotation of the motor 116 in one direction may be achieved , for example , by selective , operator - controlled actuation of the metering valves 124 , 128 and rotation in a second , opposite direction may be achieved , for example , by simultaneous operator controlled actuation of the metering valves 122 , 126 . referring to fig1 the input device 170 may be positioned to provide an input to initiate the exemplary control operation shown in fig2 . the input may include a desired pressure at the working chamber and a flow limit to the working chamber based on the lever position in accordance with the exemplary graphs shown in fig3 and 4 . for example , an operator may initially move the input device 170 to a 100 % position corresponding to clockwise rotation of the motor 116 to position a cab with an attached swing arm . accordingly , the desired working pressure to be applied to a working chamber may be equal to a maximum desired pressure and the flow limit may be equal to a maximum flow limit . as the exemplary operation 200 proceeds , the maximum desired pressure is compared to the sensed pressure at the working chamber , for example , first end chamber 118 , associated with clockwise rotation . since the pressure error will likely be greater than , for example , 5000 kpa , or some other second predetermined positive pressure limit , the controller 160 may operate the pcfe metering valve 124 to increase the fluid flow to the first end chamber 118 up to the maximum flow limit associated with the position of the input device 170 . the controller 160 may also operate the ctfe metering valve 122 to provide zero bleed flow . this operation may continue until the position of the input device 170 is changed or until the pressure error is less than 5000 kpa . if the load is swinging freely , i . e ., without resistance of a wall , barrier , or the like , the pressure error may eventually be less than 5000 kpa . however , when swinging freely , it is unlikely that the pressure error will be less than the first predetermined positive pressure limit , for example , 50 kpa , or some other first predetermined positive pressure limit , even though the operator maintains the input device 170 in the 100 % clockwise position . when the pressure error is between the first and second predetermined positive pressure limits , the controller 160 may continue to increase the fluid flow to the first end chamber 118 up to the maximum flow limit associated with the position of the input device 170 . the controller 160 may operate the ctfe metering valve 122 to decrease the bleed flow to or maintain a bleed flow at a minimum bleed flow equal to a predetermined value . this operation may continue until the position of the input device 170 is changed or until the pressure error is less than 50 kpa or greater than 5000 kpa . again , the specific pressures identified are exemplary only . the present invention is not limited to operation in accordance with specific pressures . if the load continues to swing freely , it is likely that the pressure error will drop below the second predetermined positive pressure error limit , for example , 5000 kpa , while overcoming friction forces encountered to get the load swinging . after overcoming the friction forces , the pressure error will likely increase and become greater than the second positive limit , for example , 5000 kpa . after exceeding the second positive limit , the controller 160 may operate the pcfe metering valve 124 to increase the fluid flow to the first end chamber 118 once again , up to the maximum flow limit associated with the position of the input device 170 . the controller 160 may also operate the ctfe metering valve 122 to provide zero bleed flow . this situation may continue until the position of the input device 170 is changed or until the pressure error is less than 5000 kpa . if , after initiating movement , the load encounters an obstruction , for example , a wall or any other barrier , the pressure error may decrease below the first predetermined positive pressure error limit , for example , 50 kpa . until that time , the system 100 may operate as described above for the situation where the pressure error is greater than the second positive limit and the situation where the pressure error is between the first and second positive limits . when the pressure error becomes less than the first predetermined positive pressure error limit , for example , 50 kpa , and greater than a first predetermined negative pressure error limit , for example , − 50 kpa , the controller 160 may operate the pcfe metering valve 124 to maintain the present fluid flow to the first end chamber 118 up to the maximum flow limit associated with the position of the input device 170 . the controller 160 may also operate the ctfe metering valve 122 to maintain the previous bleed flow . these controller operations may keep the pressure error near zero . this situation may continue until the position of the input device 170 is changed or until the pressure error is greater than 50 kpa or less than − 50 kpa . if the pressure error becomes less than the first predetermined negative pressure error limit , for example , − 50 kpa , the controller 160 may operate the pcfe metering valve 124 to decrease the present fluid flow to the first end chamber 118 . the controller 160 may also operate the ctfe metering valve 122 to increase the bleed flow . these controller operations may force the pressure error back toward zero . this situation may continue until the position of the input device 170 is changed or until the pressure error is greater than − 50 kpa . it should be appreciated that the bleed flow may provide damping and stability to the system . however , upon initiation by the operator , the chamber - to - tank metering valve 122 , 128 associated with the working chamber 118 , 120 , which controls the bleed flow , may remain closed to eliminate the possibility of the load swinging in the opposite direction , also referred to as backdriving . it should also be appreciated that , at a full lever command , the pressure error may be large and the bleed flow may be reduced to zero , thereby improving fuel efficiency . thus , the present invention provides a swing control algorithm for a hydraulic circuit , which may provide both flow and pressure control on a closed center system without the use of a dedicated swing pump . the swing control algorithm may simplify the hydraulic control system , offer a cost savings , and / or provide an open center feel to a closed center hydraulic system . as shown in fig1 the operation of an exemplary embodiment of this invention may be implemented on a controller 160 . the controller 160 may include a general purpose or special purpose computer , a programmed microprocessor or microcontroller and peripheral integrated circuit elements , an asic or other integrated circuit , a hardware electronic or logic circuit such as a discrete element circuit , a programmable logic device such as a pld , pla , fpga or pal , or the like . in general , any device on which a finite state machine capable of implementing the flowchart shown in fig2 can be used to implement the controller functions of this invention . it will be apparent to those skilled in the art that various modifications and variations can be made in the hydraulic control system and / or the swing control algorithm without departing from the scope or spirit of the invention . other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein . it is intended that the specification and examples be considered as exemplary only , with a true scope and spirit of the invention being indicated by the following claims and their equivalents .