Report, 20150423, On Distance Rate

Section 1. On "Distance Rate"

Definition 1. The Riemannian distance of two positive-definite symmetric matrices $P_1$ and $P_2$ is \[d\left( {{P_1},{P_2}} \right) = {\left\| {\log \left( {{P_1}^{ - 1}{P_2}} \right)} \right\|_F} = {\left( {\sum\limits_{i = 1}^n {{{\ln }^2}{\lambda _i}} } \right)^{\frac{1}{2}}}\] where $\lambda_i,~i=1,\ldots,n$ are the eigenvalues of $P_1^{-1}P_2$.

Lemma 1. If a function $H\left( z \right) = \sum\nolimits_{n = 0}^\infty  {{h_n}{z^{ - n}}} $ is minimum-phase and $h_0 \ne 0$, then \begin{equation} \nonumber \ln h_0^2 = \frac{1}{{2\pi }}\int_{ - \pi }^\pi  {\ln {{\left| {H\left( {{e^{j\omega }}} \right)} \right|}^2}d\omega }. \end{equation}

For a minimum-phase system, we have shown that \[\left[ {\begin{array}{*{20}{c}} {{y_0}}\\ {{y_1}}\\  \vdots \\ {{y_{n - 1}}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {{h_0}}&0& \cdots &0\\ {{h_1}}&{{h_0}}& \cdots &0\\  \vdots & \vdots &{}& \vdots \\ {{h_{n - 1}}}&{{h_{n - 2}}}& \cdots &{{h_0}} \end{array}} \right]\left[ {\begin{array}{*{20}{c}} {{u_0}}\\ {{u_1}}\\  \vdots \\ {{u_{n - 1}}} \end{array}} \right] \buildrel \Delta \over = A_n\left[ {\begin{array}{*{20}{c}} {{u_0}}\\ {{u_1}}\\  \vdots \\ {{u_{n - 1}}} \end{array}} \right].\]

Suppose that $h_0 \ne 0$ which implies that $A_n$ is nonsingular and let the system input be Gaussian white with zero mean and $\sigma_u^2$ as covariance. Let ${\tilde u_k} = {[ {\begin{array}[b]{*{20}{c}} {{u_0}}&{{u_1}}& \cdots &{{u_{k-1}}} \end{array}}]^T}$ and ${\tilde y_k} = {[ {\begin{array}[b]{*{20}{c}} {{y_0}}&{{y_1}}& \cdots &{{y_{k-1}}} \end{array}}]^T}$, it's easy to see that \begin{equation} \label{def_Uk_Yk} \begin{aligned} {U_k} &= E\left\{ {{{\tilde u}_k}{{\tilde u}_k}^T} \right\} = \sigma_u^2 I_k\\ {Y_k} &= E\left\{ {{{\tilde y}_k}{{\tilde y}_k}^T} \right\} = \sigma_u^2 A_k A_k^T \end{aligned} \end{equation} which implies that ${U_k}^{ - 1}{Y_k} = A_k A_k^T$.

Now we define the distance rate as

\begin{equation} \label{def_dist_rate}
\begin{aligned}
\bar d\left( {U,Y} \right) &= \mathop {\lim \sup }\limits_{k \to \infty } \frac{{d\left( {{U_k},{Y_k}} \right)}}{k^{1/2}} \\
 &= \mathop {\lim \sup }\limits_{k \to \infty }{\left( {\frac{1}{k}\sum\limits_{i = 1}^k {{{\ln }^2}{\lambda _i}\left( {U_k^{ - 1}{Y_k}} \right)} } \right)^{\frac{1}{2}}}.
\end{aligned}
\end{equation}

Directly substitute (\ref{def_Uk_Yk}) into (\ref{def_dist_rate}), we have \begin{equation}\nonumber \begin{aligned} \frac{{d\left( {{U_k},{Y_k}} \right)}}{{{k^{1/2}}}} &= {\left( {\frac{1}{k}\sum\limits_{i = 1}^k {{{\ln }^2}{\lambda _i}\left( {{A_k}A_k^T} \right)} } \right)^{\frac{1}{2}}} \\ &\ge \frac{1}{k}\sum\limits_{i = 1}^k {\ln {\lambda _i}\left( {{A_k}A_k^T} \right)}  \\ &= \frac{1}{k}\ln \left| {{A_k}A_k^T} \right| \\ &= \frac{1}{k}\ln {\left| {{h_0}} \right|^{2k}} \\ &= \ln {\left| {{h_0}} \right|^2} \end{aligned} \end{equation} or, more clearly, $\bar d\left( {U,Y} \right) \ge \ln {\left| {{h_0}} \right|^2}$. Furthermore, by lemma 1 and Papoulis's theorem, we know that \[\bar d\left( {U,Y} \right) \ge \frac{1}{{2\pi }}\int_{ - \pi }^\pi  {\ln {{\left| {H\left( {{e^{j\omega }}} \right)} \right|}^2}d\omega }  = \bar h\left( y \right) - \bar h\left( u \right).\] On the other hand, the distance rate is bounded by the absolute value of the logarithm of the maximum singular value of $A_k$'s, i.e., \begin{equation} \begin{aligned} \bar d\left( {U,Y} \right) &= \mathop {\lim \sup }\limits_{k \to \infty } {\left( {\frac{1}{k}\sum\limits_{i = 1}^k {{{\ln }^2}{\lambda _i}\left( {{A_k}A_k^T} \right)} } \right)^{\frac{1}{2}}} \\ &\le \mathop {\lim \sup }\limits_{k \to \infty } {\left( {\frac{1}{k}\sum\limits_{i = 1}^k {\max\left\{ {{{\ln }^2}{\lambda _i}\left( {{A_k}A_k^T} \right)} \right\}} } \right)^{\frac{1}{2}}} \\ &\le \mathop {\sup }\limits_k \left( {\left| {\ln {\lambda _i}\left( {{A_k}A_k^T} \right)} \right|} \right). \end{aligned} \end{equation} Generally, we have \[\mathop {\lim \sup }\limits_{k \to \infty } \frac{1}{k}\ln \left| {U_k^{ - 1}{Y_k}} \right| \le \bar d\left( {U,Y} \right) \le \mathop {\sup }\limits_k \left( {\left| {\ln {\lambda _i}\left( {U_k^{ - 1}{Y_k}} \right)} \right|} \right).\] However, the upper bound $\mathop {\sup }\limits_k \left( {\left| {\ln {\lambda _i}\left( {U_k^{ - 1}{Y_k}} \right)} \right|} \right)$ may be conservative or even divergent.

Section 2. A Theorem

Let $f(x)$ be a real-valued function of the class $L$, \[{c_n} = \frac{1}{{2\pi }}\int_{ - \pi }^\pi  {{e^{-inx}}f\left( x \right)dx} ,~~~n = 0, \pm 1, \pm 2, \ldots ,\] its Fourier coefficients. We consider the finite Toeplitz forms \begin{equation} \begin{aligned} {T_n}\left( f \right) &= \sum\limits_{i,j = 0,1,2, \ldots ,n} {{c_{j - i}}{u_i}{{\bar u}_j}}  \\ &= \frac{1}{{2\pi }}\int_{ - \pi }^\pi  {{{\left| {{u_0} + {u_1}{e^{ix}} +  \cdots  + {u_n}{e^{inx}}} \right|}^2}f\left( x \right)dx} ,\\ &~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~n = 0,1,2, \ldots. \end{aligned} \end{equation} The eigenvalues of the Hermitian form $T_n(f)$ are defined as the roots of the characteristic equation $\det T_n(f-\lambda)=0$; we denote them by $${\lambda _1^{\left( n \right)}},{\lambda _2^{\left( n \right)}},\ldots,{\lambda _n^{\left( n \right)}}.$$ As well known, these values are all real.

Theorem 1. [1] We denote by $m$ and $M$ the 'essential' lower bound and upper bound of $f(x)$, respectively, and assume that $m$ and $M$ are finite. If $G(\lambda)$ is any continuous function defined in the finite interval $m \le \lambda \le M$, we have \[\mathop {\lim }\limits_{n \to \infty } \frac{{G\left( {\lambda _1^{\left( n \right)}} \right) + G\left( {\lambda _2^{\left( n \right)}} \right) +  \cdots  + G\left( {\lambda _{n + 1}^{\left( n \right)}} \right)}}{{n + 1}} = \frac{1}{{2\pi }}\int_{ - \pi }^\pi  {G\left[ {f\left( x \right)} \right]dx}.\]

Corollary. [2] \[\mathop {\lim }\limits_{n \to \infty } \frac{{\sum\nolimits_{i = 1}^n {G\left( {{\lambda _i}\left( {\Sigma \left( {e_1^k} \right)} \right)} \right)} }}{n} = \frac{1}{{2\pi }}\int_{ - \pi }^\pi  {G\left[ {{{\hat F}_e}\left( \omega  \right)} \right]d\omega } .\]

References

[1] Ulf Grenander and Gabor Szego. Toeplitz Forms and Their Applications. Univ. Calif. Press, 2001.

[2] N.C. Martins and M.A. Dahleh. Fundamental limitations of performance in the presence of finite capacity feedback. In American Control Conference, 2005. Proceedings of the 2005, pages 79–86 vol. 1, June 2005.

转载于:https://www.cnblogs.com/aujun/p/4451487.html

乐播投屏是一款简单好用、功能强大的专业投屏软件,支持手机投屏电视、手机投电脑、电脑投电视等多种投屏方式。 多端兼容与跨网投屏:支持手机、平板、电脑等多种设备之间的自由组合投屏,且无需连接 WiFi,通过跨屏技术打破网络限制,扫一扫即可投屏。 广泛的应用支持:支持 10000+APP 投屏,包括综合视频、网盘与浏览器、美韩剧、斗鱼、虎牙等直播平台,还能将央视、湖南卫视等各大卫视的直播内容一键投屏。 高清流畅投屏体验:腾讯独家智能音画调校技术,支持 4K 高清画质、240Hz 超高帧率,低延迟不卡顿,能为用户提供更高清、流畅的视觉享受。 会议办公功能强大:拥有全球唯一的 “超级投屏空间”,扫码即投,无需安装。支持多人共享投屏、远程协作批注,PPT、Excel、视频等文件都能流畅展示,还具备企业级安全加密,保障会议资料不泄露。 多人互动功能:支持多人投屏,邀请好友加入投屏互动,远程也可加入。同时具备一屏多显、语音互动功能,支持多人连麦,实时语音交流。 文件支持全面:支持 PPT、PDF、Word、Excel 等办公文件,以及视频、图片等多种类型文件的投屏,还支持网盘直投,无需下载和转格式。 特色功能丰富:投屏时可同步录制投屏画面,部分版本还支持通过触控屏或电视端外接鼠标反控电脑,以及在投屏过程中用画笔实时标注等功能。
globals [ evacuation_time ; 总疏散时间(秒) total_students ; 学生总数 exited_students ; 已疏散学生数 evacuation_data ; 存储疏散率数据 available_chairs ; 椅子总数 stop-requested? ; 停止实验标志 ] patches-own [ is_obstacle? ; 是否为障碍物 is_exit? ; 是否为出口 exit_id ; 出口编号(1或2) is_chair? ; 是否为椅子 ] turtles-own [ target_exit ; 目标出口 moved? ; 本回合是否已移动 speed ; 当前移动速度 consecutive_failures ; 连续移动失败次数 ] ; 初始化设置 to setup clear-all set evacuation_data [] set exited_students 0 set evacuation_time 0 set total_students num_students set stop-requested? false ; 重置停止标志 setup-classroom set available_chairs find-available-chairs ; 获取可用椅子位置 create-students reset-ticks end ; 查找所有可用椅子位置 to-report find-available-chairs report sort patches with [is_chair?] ; 返回所有椅子地块 end ; 设置教室布局 to setup-classroom ; 教室尺寸:26x24 patches (13m x 12m, 0.5m/格) ask patches [ set pcolor white ; 默认地板 set is_obstacle? false set is_exit? false set is_chair? false ] ; 设置讲台区域 (前部中央) ask patches with [pxcor >= 10 and pxcor <= 15 and pycor >= 23 and pycor <= 25] [ set pcolor blue set is_obstacle? true set is_chair? false ] ; 设置桌椅布局 (A/B/C三区) setup-seats "A" 3 5 1 3 ; A区:3列5排 setup-seats "B" 4 5 9 3 ; B区:4列5排 setup-seats "C" 3 4 19 7 ; C区:3列4排 ; 设置过道 (1m宽) ask patches with [ (pxcor >= 7 and pxcor <= 8 and pycor <= 20) or ; AB区域间过道 (pxcor >= 17 and pxcor <= 18 and pycor <= 20) or ; BC区域间过道 (pycor >= 21 and pycor <= 22) ; 前排过道 ] [ set pcolor yellow set is_chair? false ] let select_type exit_type ; 设置出口 ask patches with [pxcor >= 23 and pxcor <= 24 and pycor >= 24 and pycor <= 25] [ ; 出口0 set pcolor green set is_exit? true set is_chair? false set exit_id 0 ] If select_type = “double” [ ask patches with [pxcor >= 23 and pxcor <= 24 and pycor >= 2 and pycor <= 3][ ; 出口1 set pcolor green set is_exit? true set is_chair? false set exit_id 1 ] ] ; 设置墙壁 ask patches [ if (pxcor = 0 or pxcor = 25 or pycor = 0 or pycor = 27) and not (pycor = 24 and (pxcor = 12 or pxcor = 14)) [ set pcolor gray set is_obstacle? true set is_chair? false ] ] end ; 设置座位区域 to setup-seats [region cols rows start_x start_y] let j 0 while [j < rows] [ let x start_x ; 列间隔2格(1米) let y start_y + j * 4 ; 行间隔2格(1米) ; 设置桌子 ask patches with [pxcor >= x and pxcor < 2 * cols + x and pycor >= y and pycor <= y + 1] [ set pcolor black set is_obstacle? true set is_chair? false ] ; newcode-chair let i 0 while [i < cols][ let chair_x start_x + i * 2 let chair_y y - 2 ask patch chair_x chair_y[ set pcolor gray + 1 set is_chair? true ] set i i + 1 ] set j j + 1 ] end ; 创建学生(修改后) to create-students ; 检查椅子数量是否足够 if total_students > length available_chairs [ user-message (word "需要 " total_students " 个座位,但只有 " count available_chairs " 个座位可用。") stop ] create-turtles total_students [ set color blue set shape "person" set size 2 set speed 1.2 set moved? false set target_exit -1 set consecutive_failures 0 ; 初始化连续失败次数 ; 随机选择一个椅子位置 let chair one-of available_chairs set available_chairs remove chair available_chairs ; 从可用列表中移除 ; 移动到椅子位置 if chair != nobody [ ; 获取椅子地块的坐标 let chair-x [pxcor] of chair let chair-y [pycor] of chair ; 计算学生位置(椅子中心偏下) let student-x chair-x ; 椅子区域中心x let student-y chair-y + 0.5 ; 下移0.25m(椅子高度的一半) ; 设置学生位置 setxy student-x student-y ] ] end ; 主循环 to go if stop-requested? [ stop ] ; 检查停止标志 ; 检查是否所有学生都已疏散 if count turtles = 0 [ set evacuation_time ticks / 10 ; 转换为秒 stop ] ask turtles [ if not moved? [ ; 本回合尚未移动 ; 到达出口检查 if [is_exit?] of patch-here [ set exited_students exited_students + 1 die ] ; 选择目标出口 if target_exit = -1 [ choose-target-exit ] ; 向出口移动 move-towards-exit set moved? true ] ] ; 记录疏散率数据 if ticks mod 10 = 0 [ ; 每10个ticks记录一次(1秒) set evacuation_data lput (list (ticks / 10) (exited_students / total_students)) evacuation_data ] ; 重置移动状态 ask turtles [ set moved? false ] tick end ; 选择目标出口 to choose-target-exit ; 双出口路径选择 let exit0 min-one-of patches with [exit_id = 0] [distance myself] let exit1 min-one-of patches with [exit_id = 1] [distance myself] let d0 [distance myself] of exit0 let d1 [distance myself] of exit1 ifelse d0 < d1 [ set target_exit 0 ] [ ifelse d0 = d1 [ set target_exit random 2 ; 距离相等时随机选择 ] [ set target_exit 1 ] ] end to move-towards-exit let nearest-exit min-one-of patches with [is_exit?] [distance myself] ; 确定最近的出口 ifelse nearest-exit != nobody [ face nearest-exit ; 检查前方补丁是否为墙壁或已被占据 let next-patch patch-ahead 1 ifelse [pcolor] of next-patch != gray and not any? other turtles-on next-patch [ move-to next-patch ] [ rt random 45 - 22.5 ; 如果前方是墙壁或被占据,则随机调整方向 ] ] [ ; 如果没有找到出口,则随机移动 rt random 360 fd 1 ] end ; 智能绕行障碍物算法 to smart-avoid-obstacle [dist] ; 尝试左右45度 if try-move-direction dist 45 [ set consecutive_failures 0 stop ] if try-move-direction dist -45 [ set consecutive_failures 0 stop ] ; 如果45度不行,尝试90度 if try-move-direction dist 90 [ set consecutive_failures 0 stop ] if try-move-direction dist -90 [ set consecutive_failures 0 stop ] ; 如果还不行,尝试135度 if try-move-direction dist 135 [ set consecutive_failures 0 stop ] if try-move-direction dist -135 [ set consecutive_failures 0 stop ] ; 最后尝试后退 if try-move-direction dist 180 [ set consecutive_failures 0 stop ] ; 如果所有方向都失败,尝试小步移动 let small-step dist / 2 if small-step > 0.05 and try-move-direction small-step random 360 [ set consecutive_failures 0 stop ] ; 增加失败计数 set consecutive_failures consecutive_failures + 1 ; 如果连续失败太多次,重新选择目标出口 if consecutive_failures > 5 [ set target_exit -1 ; 强制重新选择目标 set consecutive_failures 0 ] end ; 尝试特定方向移动 to-report try-move-direction [dist angle] let original-heading heading set heading heading + angle if my-can-move? dist [ fd dist report true ] set heading original-heading report false end ; 增强的障碍物检查 - 检查路径上的所有点 to-report my-can-move? [dist] ; 检查目标地块 let target patch-ahead dist if target = nobody [ report false ] ; 检查路径上的所有点 let steps 5 ; 检查路径上的5个点 let step-size dist / steps let current-dist step-size repeat steps [ let p patch-ahead current-dist if p != nobody and ([is_obstacle?] of p or any? other turtles-on p) [ report false ] set current-dist current-dist + step-size ] ; 检查终点 report (not [is_obstacle?] of target) and (not any? other turtles-on target) end ; 获取路径上的地块 to-report patches-along-path [angle go_distance step-size] let steps floor (go_distance / step-size) let path [] let current-x xcor let current-y ycor repeat steps [ set current-x current-x + step-size * sin angle set current-y current-y + step-size * cos angle let p patch current-x current-y if p != nobody [ set path lput p path ] ] report path end ; 运行实验 to run-experiment set stop-requested? false ; 重置停止标志 set total_students num_students setup let max-ticks 2000 ; 最大200秒 let counter 0 while [counter < max-ticks and count turtles > 0 and not stop-requested?] [ go set counter counter + 1 ; 添加短暂延迟以便界面更新 if counter mod 10 = 0 [ display ] ] ; 导出数据 export-data end ; 停止实验过程 to stop-experiment set stop-requested? true show "实验已手动停止" end ; 导出疏散数据 to export-data let filename (word "evacuation_" exit_type "_" num_students ".csv") file-open filename file-print "Time(s),EvacuationRate" foreach evacuation_data [ [data] -> file-print (word (item 0 data) "," (item 1 data)) ] file-close show word "数据已导出到: " filename end ; 获取当前疏散率 to-report evacuation-rate report exited_students / total_students end ; 可视化设置 to visualize ; 设置观察视角 resize-world -1 26 -1 25 set-patch-size 10 end我现在A 区的学生不往出口跑会卡在墙上,请帮我进行修改中If select_type = “double” [报错
06-12
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值