Line 4... |
Line 4... |
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
-- File : pid_controller.vhd
|
-- File : pid_controller.vhd
|
-- Author : Tomasz Turek <tomasz.turek@gmail.com>
|
-- Author : Tomasz Turek <tomasz.turek@gmail.com>
|
-- Company : SzuWar ZOO
|
-- Company : SzuWar ZOO
|
-- Created : 12:56:06 20-07-2010
|
-- Created : 12:56:06 20-07-2010
|
-- Last update: 23:01:16 07-10-2010
|
-- Last update: 20:35:49 13-10-2010
|
-- Platform : Xilinx ISE 10.1.03
|
-- Platform : Xilinx ISE 10.1.03
|
-- Standard : VHDL'93/02
|
-- Standard : VHDL'93/02
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
-- Description:
|
-- Description:
|
-- PID CONTROLLER
|
-- PID CONTROLLER
|
--
|
--
|
-- ___________ ___
|
-- ___________ ___
|
-- | | | |
|
-- | | | |
|
-- |-->| KP Gain |------------------------>| + |
|
-- |-->| KP Gain |---------------------------->| + |
|
-- | |___________| | |
|
-- | |___________| | |
|
-- | | |
|
|
-- | ___________ | |
|
-- | ___________ | |
|
-- | | -iDelayD | | |
|
-- | | -iDelayD | | |
|
-- | |--| Z |<--| | |
|
-- | |->| Z |<-| | |
|
-- | | |___________| | | |
|
-- | | |___________| | | |
|
-- | | ___ | | |
|
-- | | | ___ | |
|
-- | | | | | | | _________
|
-- | | | | | | | _________
|
-- _______ ___________ | ___________ |------->| - | | | | | |
|
-- _______ ___________ | ___________ | |->| - | | | | |
|
-- | | | | | | | | |-----|-->| + |-->| correct |
|
-- | | | | | | | | | |->| + |-->| correct |
|
-- | error |-->| KM Gain |--|-->| KD Gain |---------->| + | | | |_________|
|
-- | error |-->| KM Gain |--|-->| KD Gain |-|------------------->| + | | | |_________|
|
-- |_______| |___________| | |___________| |___| | |
|
-- |_______| |___________| | |___________| |___| | |
|
-- | | |
|
|
-- | ____ | |
|
-- | ____ | |
|
-- | | -1| | |
|
-- | | -1| | |
|
-- | |--| Z |<---| | |
|
-- | |--| Z |<---| | |
|
-- | | |____| | | |
|
-- | | |____| | | |
|
-- | | ___ | | |
|
-- | | ___ | | |
|
-- | | | | | | |
|
-- | | | | | | |
|
-- | ___________ |-->| + | | | |
|
-- | ___________ |-->| + | | | |
|
-- | | | | |----|-------->| + |
|
-- | | | | |----|------------>| + |
|
-- |-->| KI Gain |----->| + | | |
|
-- |-->| KI Gain |----->| + | | |
|
-- |___________| |___| |___|
|
-- |___________| |___| |___|
|
--
|
--
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
-- Copyright (c) 2010 SzuWar ZOO
|
-- Copyright (c) 2010 SzuWar ZOO
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
-- Revisions :
|
-- Revisions :
|
-- Date Version Author Description
|
-- Date Version Author Description
|
-- 12:56:06 20-07-2010 1.0 aTomek Created
|
-- 12:56:06 20-07-2010 1.0 aTomek Created
|
-- 19:29:34 04-10-2010 1.1 aTomek Created
|
-- 19:29:34 04-10-2010 1.1 aTomek Created
|
|
-- 20:35:02 13-10-2010 1.2 aTomek Created
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
|
|
library IEEE;
|
library IEEE;
|
use IEEE.STD_LOGIC_1164.ALL;
|
use IEEE.STD_LOGIC_1164.ALL;
|
use IEEE.STD_LOGIC_ARITH.ALL;
|
use IEEE.STD_LOGIC_ARITH.ALL;
|