Q-learning for optimal tracking control of linear discrete-time systems with unknown dynamics

Reinforcement Q -learning for optimal tracking control of linear discrete-time systems with unknown dynamics✩,2014, Bahare Kiumarsi ,Frank L. Lewis , Hamidreza Modares ,Ali Karimpour ,Mohammad-Bagher Naghibi-Sistani

对未知离散时间系统,提出新的基于Qlearning算法求解无限时域线性二次跟踪器LQT问题。线性指令生成器以产生参考轨迹,由指令生成器和原系统组成增广系统。值函数是增广系统(状态和参考轨迹)的二次型函数。给出求解LQT的贝尔曼方程和增广的代数Riccati方程。而本文只需要求解增广的ARE方程。Qlearning算法以在线求解增广ARE(未知系统动力学或指令生成器、不需要增广系统动力学),
传统的LQT求解有前馈输入(求解非因果差分方程)和反馈输入(求解ARE)。
在以往文章中采用动力学可逆概念以求得前馈控制输入,RL以求解最优反馈控制输入。但动力学可逆需要控制输入是可逆的,且具有完全的系统动力学知识。
LQT的标准解需要同时求解ARE和非因果差分方程,且求解非因果辅助变量需要时间上向后计算。只能用于由渐进稳定的指令生成器生成参考轨迹;
Assumption1给出LQT的参考轨迹由指令生成器,给出增广系统和其性能指标或值函数。
Lemma1给出值函数的二次型形式,将稳定控制策略代入值函数得到二次型形式,P为核矩阵。
Theorem1给出求解LQT的因果解的ARE。选择更小的折扣因子和更大的权重Q使得跟踪误差更小。augmented LQT ARE与standard LQT ARE 多折扣因子
在这里插入图片描述

Theorem2给出LQT的ARE解的最优性和稳定性,定义与折扣因子有关的误差,在渐近稳定误差下求解LQT ARE的最优控制。且表明系统的跟踪误差是有界的。选择更小折扣因子或更大Q使得跟踪误差越小。

RL方法根据系统轨迹测量的数据在线递归迭代更新值函数和控制策略
Algorithm1给出离线PI算法求解LQT,初始稳定控制策略
在这里插入图片描述
该算法离线,需要完整的动力学知识,因此采用贝尔曼方程(而不是李雅普诺夫方程)在线评估控制策略,即Algorithm2,仍需要初始稳定控制策略。
在这里插入图片描述
尽管不需系统动力学知识求解贝尔曼方程,但仍需要系统动力学知识更新控制策略(53)。
基于Qfunction,Algorithm3给出Qfunction贝尔曼方程,使用LQT的Qfunction提出PI算法
在这里插入图片描述
学习和矩阵H,以不需要系统动力学。最小二乘LS实现策略评估。

如果系统状态不是在期望轨迹或位置上,则需要PE条件。
展望:仅通过测量输入数据和参考轨迹数据求解该方法下的LQT问题;考虑VI值迭代下的实现(不需要初始可容许控制策略)

matlab仿真(Frank L.Lewis)

代码私聊

  • 8
    点赞
  • 30
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Q-learning is a popular reinforcement learning algorithm used to solve Markov Decision Processes (MDPs). In Python, you can implement Q-learning using various libraries such as NumPy and TensorFlow. Here's a basic implementation of Q-learning in Python: ```python import numpy as np # Define the Q-learning function def q_learning(env, num_episodes, learning_rate, discount_factor, epsilon): # Initialize the Q-table num_states = env.observation_space.n num_actions = env.action_space.n Q = np.zeros((num_states, num_actions)) # Q-learning loop for episode in range(num_episodes): state = env.reset() done = False while not done: # Choose an action using epsilon-greedy policy if np.random.uniform() < epsilon: action = env.action_space.sample() else: action = np.argmax(Q[state]) # Perform the action and observe the next state and reward next_state, reward, done, _ = env.step(action) # Update the Q-table Q[state, action] += learning_rate * (reward + discount_factor * np.max(Q[next_state]) - Q[state, action]) state = next_state return Q # Example usage env = gym.make('your_environment') # Replace 'your_environment' with the name of your environment num_episodes = 1000 learning_rate = 0.1 discount_factor = 0.9 epsilon = 0.1 Q_table = q_learning(env, num_episodes, learning_rate, discount_factor, epsilon) ``` In this example, `env` represents the environment you want to train your agent on (e.g., a grid world). `num_episodes` is the number of episodes the agent will play to learn the optimal policy. `learning_rate` controls the weight given to the new information compared to the old information, while `discount_factor` determines the importance of future rewards. `epsilon` is the exploration rate that balances exploration and exploitation. Note that you need to install the required libraries (e.g., NumPy and gym) before running the code.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值